-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
53 lines (49 loc) · 1.72 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
53 lines (49 loc) · 1.72 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
50
51
52
53
# Pinned project name: keeps the db_data volume binding stable regardless of
# the directory the stack is deployed from.
name: dicechess-analytics
services:
db:
image: postgres:18-alpine
restart: always
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRES_USER:-dicechess_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-dicechess_password}
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_DB: ${POSTGRES_DB:-dicechess_analytics}
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-dicechess_user} -d $${POSTGRES_DB:-dicechess_analytics}"]
interval: 5s
timeout: 5s
retries: 5
api:
# Tag is overridable so one compose file serves every environment: staging
# deploys a candidate tag (API_TAG=vX.Y.Z or sha-…), prod pins a released
# version, unset defaults to :latest for dev/local. See `mise run staging:deploy`.
image: ghcr.io/rabestro/dicechess-analytics-api:${API_TAG:-latest}
restart: always
env_file:
- .env
environment:
# The Scala backend normalizes the asyncpg scheme to JDBC; kept for .env compatibility
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-dicechess_user}:${POSTGRES_PASSWORD:-dicechess_password}@db:5432/${POSTGRES_DB:-dicechess_analytics}
JAVA_OPTS: "-Dcats.effect.warnOnNonMainThreadDetected=false --sun-misc-unsafe-memory-access=allow"
ports:
- "8020:8000"
depends_on:
db:
condition: service_healthy
ui:
image: ghcr.io/rabestro/dicechess-analytics-ui:${UI_TAG:-latest}
restart: always
ports:
- "8030:8080"
depends_on:
- api
volumes:
db_data: