-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (54 loc) · 1.36 KB
/
docker-compose.yml
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
56
57
version: '3.8'
services:
web-test:
build:
context: .
dockerfile: ./Dockerfile.test
# Using Debugpy
command: [
"bash",
"-c",
"while !</dev/tcp/db/5432; do sleep 1; done; python -m debugpy --listen 0.0.0.0:5679 -m uvicorn backend.main:app --host 0.0.0.0 --reload"
]
volumes:
- ./backend:/usr/src/app/backend
environment:
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/starter_db_dev
- ENV_FOR_DYNACONF=development
ports:
- 8005:8000
- 5679:5679
depends_on:
- web
web:
build:
context: .
dockerfile: ./Dockerfile
# Using Debugpy
command: [
"bash",
"-c",
"while !</dev/tcp/db/5432; do sleep 1; done; python -m debugpy --listen 0.0.0.0:5678 -m uvicorn backend.main:app --host 0.0.0.0 --reload"
]
volumes:
- ./backend:/usr/src/app/backend
environment:
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/starter_db_dev
- ENV_FOR_DYNACONF=development
ports:
- 8004:8000
- 5678:5678
depends_on:
- db
db:
image: postgres:15.1-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=starter_db_dev
expose:
- 5432
volumes:
- ./postgres-data:/var/lib/postgresql/data
volumes:
postgres_data: