-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-wsl.yml
More file actions
43 lines (40 loc) · 829 Bytes
/
Copy pathdocker-compose-wsl.yml
File metadata and controls
43 lines (40 loc) · 829 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
name: myapp-wsl
services:
postgres:
image: postgres:16-bookworm
env_file:
- ./.env.docker
ports:
- "5433:5432"
volumes:
- postgres_db_wsl:/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: .
image: rasdec19/fastapi:myapp-wsl-api
env_file:
- ./.env.docker
ports:
- "8001:8000"
command:
[
"gunicorn",
"-w",
"4",
"-k",
"uvicorn.workers.UvicornWorker",
"app.main:app",
"--bind",
"0.0.0.0:8000",
]
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
postgres_db_wsl: