-
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) · 1.14 KB
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (33 loc) · 1.14 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-healthsync}
POSTGRES_USER: ${POSTGRES_USER:-healthsync}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
ports:
- "${POSTGRES_HOST_PORT:-15432}:5432"
volumes:
- healthsync-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 12
api:
build:
context: .
dockerfile: backend/Dockerfile
environment:
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-healthsync}:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}@db:5432/${POSTGRES_DB:-healthsync}
API_TOKEN: ${API_TOKEN:?Set API_TOKEN in .env}
TOKEN_HASH_SECRET: ${TOKEN_HASH_SECRET:?Set TOKEN_HASH_SECRET in .env}
HOSTED_PUBLIC_BASE_URL: ${HOSTED_PUBLIC_BASE_URL:-}
HOSTED_PROVISIONING_ENABLED: ${HOSTED_PROVISIONING_ENABLED:-false}
depends_on:
db:
condition: service_healthy
ports:
- "${API_HOST_PORT:-8080}:8080"
volumes:
healthsync-postgres-data: