-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathcompose.yaml
More file actions
55 lines (52 loc) · 1.28 KB
/
compose.yaml
File metadata and controls
55 lines (52 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
services: # dockers compose expects
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- 8080:8000
command: uvicorn main:app --host 0.0.0.0 --port 8000
environment:
- PORT=8000
- MY_PROJECT=Hello World
env_file:
- .env.sample
volumes:
- ./backend/src:/app
depends_on:
- db_service
develop:
watch:
- action: rebuild
path: backend/requirements.txt
- action: rebuild
path: backend/Dockerfile
- action: restart
path: backend/src/
# target: /app
# DATABASE_URL=postgresql+psycopg://dbuser:db-password@db_service:5432/mydb
db_service:
image: postgres:17.5
ports:
- 5432:5432
environment:
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=db-password
- POSTGRES_DB=mydb
# env_file:
# - .env.sample-db
volumes:
- dc_managed_db_volume:/var/lib/postgresql/data
# static_html: # custom key name
# # image: python:3.13.4-slim-bullseye
# build:
# context: ./static_html
# dockerfile: static.Dockerfile
# ports:
# - 8000:8000
# - 3000:8000
# command: python -m http.server 8000
# volumes:
# - ./static_html/src:/app
volumes:
dc_managed_db_volume: