-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
134 lines (128 loc) · 3.57 KB
/
Copy pathcompose.yml
File metadata and controls
134 lines (128 loc) · 3.57 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
services:
amt:
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/minbzk/amt:latest
restart: unless-stopped
depends_on:
db:
condition: service_healthy
keycloak:
condition: service_healthy
minio-init:
condition: service_completed_successfully
env_file:
- path: prod.env
required: true
environment:
- ENVIRONMENT=local
ports:
- 8070:8000
healthcheck:
# Python instead of curl: the production image is a clean python:slim
# without curl, so the check uses the interpreter that is always present.
test:
[
"CMD",
"python",
"-c",
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/health/live').status==200 else 1)",
]
db:
image: postgres:16
restart: unless-stopped
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
- ./database/:/docker-entrypoint-initdb.d/:cached
env_file:
- path: prod.env
required: true
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "amt", "-U", "amt"]
interval: 2s
timeout: 1s
retries: 10
start_period: 2s
ports:
- 127.0.0.1:5432:5432
db-admin:
image: dpage/pgadmin4:8.6
restart: unless-stopped
ports:
- 127.0.0.1:8080:8080
environment:
- PGADMIN_LISTEN_PORT=${PGADMIN_LISTEN_PORT:-8080}
env_file:
- path: prod.env
required: true
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-O", "-", "http://localhost:8080/misc/ping"]
# Local dev identity provider (demo/demo). --hostname fixes the issuer for the browser,
# --hostname-backchannel-dynamic points the amt container at http://keycloak:8180. See BUILD.md.
keycloak:
image: quay.io/keycloak/keycloak:26.7
restart: unless-stopped
command:
[
"start-dev",
"--import-realm",
"--http-port=8180",
"--hostname=http://localhost:8180",
"--hostname-backchannel-dynamic=true",
]
environment:
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
volumes:
- ./keycloak/realms:/opt/keycloak/data/import:ro
ports:
- 127.0.0.1:8180:8180
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/127.0.0.1/8180'"]
interval: 5s
timeout: 2s
retries: 30
start_period: 20s
# Local dev object storage for measure attachments. See BUILD.md.
minio:
image: quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z
restart: unless-stopped
command: server /data
env_file:
- path: prod.env
required: true
volumes:
- app-object-data:/data
ports:
- 127.0.0.1:9000:9000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 3s
retries: 20
start_period: 5s
# The bucket must exist before amt starts, otherwise ObjectStorageService raises on construction.
minio-init:
image: quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z
restart: "no"
depends_on:
minio:
condition: service_healthy
env_file:
- path: prod.env
required: true
entrypoint:
- sh
- -c
- |
mc alias set local http://minio:9000 "$$MINIO_ROOT_USER" "$$MINIO_ROOT_PASSWORD" &&
mc mb --ignore-existing local/"$$OBJECT_STORE_BUCKET_NAME"
volumes:
app-db-data:
app-object-data: