-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (52 loc) · 1.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
55 lines (52 loc) · 1.92 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
# One PORT_PREFIX knob (default 30) drives every port and resource name so two
# fully isolated copies can run side by side — e.g. PORT_PREFIX=41 docker compose up.
# docker compose auto-reads PORT_PREFIX from the repo-root .env.
name: walnut-${PORT_PREFIX:-30}
services:
postgres:
image: postgres:17-alpine
container_name: walnut-postgres-${PORT_PREFIX:-30}
restart: unless-stopped
environment:
POSTGRES_USER: walnut
POSTGRES_PASSWORD: walnut
POSTGRES_DB: walnut
ports:
# host:container — platform metadata DB exposed on <prefix>02 (default 3002)
- "${PORT_PREFIX:-30}02:5432"
volumes:
- walnut-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U walnut -d walnut"]
interval: 5s
timeout: 5s
retries: 10
# MinIO — the local, S3-compatible object store backing per-branch storage. Prod uses a
# remote S3-compatible store (R2, Railway Buckets, …); all speak S3, so the same blob code
# path runs here. The bucket is
# created in-process by the blob provider's ensureBucket() on API/test startup, so no
# init container is needed. S3 API on <prefix>03, web console on <prefix>04.
minio:
image: minio/minio:latest
container_name: walnut-minio-${PORT_PREFIX:-30}
restart: unless-stopped
environment:
MINIO_ROOT_USER: walnut
MINIO_ROOT_PASSWORD: walnutminio
command: server /data --console-address ":9001"
ports:
# host:container — S3 API on <prefix>03 (default 3003), console on <prefix>04 (3004)
- "${PORT_PREFIX:-30}03:9000"
- "${PORT_PREFIX:-30}04:9001"
volumes:
- walnut-miniodata:/data
healthcheck:
test: ["CMD-SHELL", "mc ready local 2>/dev/null || exit 1"]
interval: 5s
timeout: 5s
retries: 10
volumes:
walnut-pgdata:
name: walnut-pgdata-${PORT_PREFIX:-30}
walnut-miniodata:
name: walnut-miniodata-${PORT_PREFIX:-30}