-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcompose.ghcr.yml
More file actions
110 lines (107 loc) · 2.74 KB
/
compose.ghcr.yml
File metadata and controls
110 lines (107 loc) · 2.74 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
services:
chap:
image: ghcr.io/dhis2-chap/chap-core:latest
platform: linux/amd64
environment:
REDIS_HOST: redis
REDIS_PORT: 6379
CHAP_DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
CELERY_BROKER: redis://redis:6379/0
CHAP_LOGS_DIR: /data/logs
CHAP_RUNS_DIR: /data/runs
container_name: chap
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
user: chap:chap
volumes:
- type: tmpfs
target: /tmp
tmpfs:
size: 2000000000 # 2GB for runtime temp files (API service)
- type: volume
source: logs
target: /data/logs
ports:
- "8000:8000"
depends_on:
redis:
condition: service_started
worker:
condition: service_started
postgres:
condition: service_healthy
worker:
depends_on:
postgres:
condition: service_healthy
image: ghcr.io/dhis2-chap/chap-worker:latest
platform: linux/amd64
environment:
IS_IN_DOCKER: 1
REDIS_HOST: redis
REDIS_PORT: 6379
CHAP_DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
CELERY_BROKER: redis://redis:6379
RENV_PATHS_ROOT: /data/renv
UV_CACHE_DIR: /data/uv
CHAP_LOGS_DIR: /data/logs
CHAP_RUNS_DIR: /data/runs
PYTENSOR_FLAGS: "base_compiledir=/data/pytensor"
command: "/app/.venv/bin/celery -A chap_core.rest_api.celery_tasks worker --loglevel=info"
working_dir: /app
extra_hosts:
- "host.docker.internal:host-gateway"
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
user: chap:chap
volumes:
- type: tmpfs
target: /tmp
tmpfs:
size: 2000000000 # 2GB for runtime temp files (model execution)
- type: volume
source: runs
target: /data/runs
- type: volume
source: renv
target: /data/renv
- type: volume
source: uv
target: /data/uv
- type: volume
source: logs
target: /data/logs
- type: volume
source: pytensor
target: /data/pytensor
redis:
image: valkey/valkey:8
postgres:
image: postgres:17
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 10s
retries: 10
start_period: 40s
volumes:
- chap-db:/var/lib/postgresql/data
expose:
- "5432"
volumes:
chap-db: {}
logs: {}
renv: {}
uv: {}
pytensor: {}
runs: {}