-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
45 lines (42 loc) · 847 Bytes
/
Copy pathdocker-compose-dev.yml
File metadata and controls
45 lines (42 loc) · 847 Bytes
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
name: myapp-dev
services:
postgres:
image: postgres:16-bookworm
env_file:
- ./.env.docker
ports:
- "5434:5432"
volumes:
- postgres_db_dev:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
api:
build: .
env_file:
- ./.env.docker
environment:
WATCHFILES_FORCE_POLLING: "true"
ports:
- "8000:8000"
volumes:
- ./:/usr/src/app:ro
command:
[
"uvicorn",
"app.main:app",
"--host",
"0.0.0.0",
"--port",
"8000",
"--reload",
]
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
postgres_db_dev: