-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (33 loc) · 877 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (33 loc) · 877 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
services:
db:
image: timescale/timescaledb:latest-pg16
container_name: nuclear_grid_risk_db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: nuclear_grid_risk
ports:
- "5432:5432"
volumes:
- nuclear_grid_risk_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d nuclear_grid_risk"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: .
container_name: nuclear_grid_risk_backend
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
env_file:
- .env
environment:
POSTGRES_HOST: db
DATABASE_URL: postgresql+psycopg://postgres:postgres@db:5432/nuclear_grid_risk
depends_on:
db:
condition: service_healthy
volumes:
nuclear_grid_risk_data: