-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (106 loc) · 3.34 KB
/
docker-compose.yml
File metadata and controls
112 lines (106 loc) · 3.34 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
# StackRivet local development stack.
# Brings up MySQL, PostgreSQL, MinIO (S3-compatible), and optional Redis on default ports.
# Tested with Docker Compose v2.
services:
mysql:
image: mysql:8.4
container_name: stackrivet-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: stackrivet
MYSQL_DATABASE: stackrivet
MYSQL_USER: stackrivet
MYSQL_PASSWORD: stackrivet
LANG: C.UTF-8
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_0900_ai_ci
- --default-time-zone=+00:00
- --max-connections=512
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-pstackrivet"]
interval: 10s
timeout: 5s
retries: 12
postgres:
image: postgres:18.4-alpine
container_name: stackrivet-postgres
restart: unless-stopped
environment:
POSTGRES_DB: stackrivet
POSTGRES_USER: stackrivet
POSTGRES_PASSWORD: stackrivet
TZ: UTC
ports:
- "5432:5432"
volumes:
# postgres:18+ stores data in a major-version subdir; the mount must be the
# parent (/var/lib/postgresql), NOT /…/data, or the image refuses to start.
- postgres-data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U stackrivet -d stackrivet"]
interval: 10s
timeout: 5s
retries: 12
minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: stackrivet-minio
restart: unless-stopped
environment:
MINIO_ROOT_USER: stackrivet
MINIO_ROOT_PASSWORD: stackrivet
command: server /data --console-address ":9001"
ports:
- "9000:9000" # S3 API
- "9001:9001" # Web console
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 12
# One-shot init: creates the buckets the app (default `stackrivet`) and the
# asset IT (`stackrivet-assets`) expect, then exits. Idempotent — safe to re-run.
# Buckets stay PRIVATE (no anonymous policy) so signed-URL access control holds.
createbuckets:
image: minio/mc:RELEASE.2025-08-13T08-35-41Z
container_name: stackrivet-createbuckets
depends_on:
- minio
restart: "no"
entrypoint: >
/bin/sh -c "
until mc alias set local http://minio:9000 stackrivet stackrivet 2>/dev/null; do
echo 'waiting for minio...'; sleep 2;
done;
mc mb --ignore-existing local/stackrivet &&
mc mb --ignore-existing local/stackrivet-assets &&
echo 'StackRivet buckets ready: stackrivet, stackrivet-assets'
"
# Redis backs JWT revocation and the actuator health check, so the default
# profile expects it. The JVM still boots without Redis, but /actuator/health
# reports DOWN and token revocation/logout fail until Redis is reachable.
redis:
image: redis:8.8-alpine
container_name: stackrivet-redis
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 12
volumes:
mysql-data:
postgres-data:
minio-data:
redis-data: