forked from Abhiix0/PIS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (45 loc) · 1.05 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (45 loc) · 1.05 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
version: '3.9'
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: pis_db
POSTGRES_USER: pis_user
POSTGRES_PASSWORD: pis_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./sql/schema.sql:/docker-entrypoint-initdb.d/01_schema.sql
- ./sql/seed.sql:/docker-entrypoint-initdb.d/02_seed.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pis_user -d pis_db"]
interval: 5s
timeout: 5s
retries: 5
api:
build: .
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://pis_user:pis_password@db:5432/pis_db
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
depends_on:
db:
condition: service_healthy
volumes:
- ./models:/app/models
- ./features:/app/features
dashboard:
build:
context: .
dockerfile: dashboard/Dockerfile
ports:
- "8501:8501"
environment:
API_URL: http://api:8000
depends_on:
- api
restart: on-failure
volumes:
postgres_data: