-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) · 927 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (40 loc) · 927 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
services:
db:
image: postgres:15
environment:
POSTGRES_DB: sentriq
POSTGRES_USER: sq_user
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "127.0.0.1:5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sq_user -d sentriq"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
app:
build: .
depends_on:
db:
condition: service_healthy
ports:
- "8000:8000"
volumes:
- ./data:/app/data
- ./.env:/app/.env
environment:
DB_URL: postgresql://sq_user:${POSTGRES_PASSWORD}@db:5432/sentriq
APP_HOST: 0.0.0.0
APP_PORT: 8000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
volumes:
pgdata: