Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (134 loc) · 4.27 KB
/
Copy pathdocker-compose.yml
File metadata and controls
143 lines (134 loc) · 4.27 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
135
136
137
138
139
140
141
142
143
# Profiles: (none)=deps only, dev=single server, cluster=N replicas behind Caddy LB
x-procella: &procella
build: .
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
minio-init:
condition: service_completed_successfully
migrate:
condition: service_completed_successfully
environment: &procella-env
PROCELLA_LISTEN_ADDR: ":9090"
PROCELLA_DATABASE_URL: "postgres://procella:procella@postgres:5432/procella?sslmode=disable"
PROCELLA_AUTH_MODE: dev
# Use a non-secret placeholder here; copy to .env and replace for real use.
PROCELLA_DEV_AUTH_TOKEN: CHANGE_ME_GENERATE_RANDOM_64_HEX
PROCELLA_DEV_USER_LOGIN: dev-user
PROCELLA_DEV_ORG_LOGIN: dev-org
PROCELLA_DEV_USERS: '[{"token":"token-user-b","login":"user-b","org":"org-b","role":"admin"},{"token":"token-viewer","login":"viewer-user","org":"dev-org","role":"viewer"}]'
# Generate via: openssl rand -hex 32 ; do not reuse across deployments.
PROCELLA_ENCRYPTION_KEY: ${PROCELLA_ENCRYPTION_KEY:?must be set; generate with `openssl rand -hex 32`}
# Signs dashboard subscription tickets; bootstrap refuses to start without it.
PROCELLA_TICKET_SIGNING_KEY: ${PROCELLA_TICKET_SIGNING_KEY:?must be set (32+ chars); generate with `openssl rand -hex 32`}
# Placeholder only; generate a unique secret when enabling /cron/gc.
PROCELLA_CRON_SECRET: CHANGE_ME_GENERATE_RANDOM_32_HEX
PROCELLA_BLOB_BACKEND: s3
PROCELLA_BLOB_S3_BUCKET: procella-checkpoints
PROCELLA_BLOB_S3_ENDPOINT: http://minio:9000
# Must match the MinIO root credentials below; MinIO rejects any other key.
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
healthcheck: &procella-health
test: ["CMD", "/procella", "--healthz"]
interval: 5s
timeout: 3s
retries: 10
services:
postgres:
image: postgres:18-alpine
environment:
POSTGRES_USER: procella
POSTGRES_PASSWORD: procella
POSTGRES_DB: procella
ports:
- "5432:5432"
volumes:
# postgres:18 keeps PGDATA at /var/lib/postgresql/18/docker and declares
# the volume one level up, so the mount must be /var/lib/postgresql.
- postgres-data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U procella"]
interval: 5s
timeout: 5s
retries: 10
minio:
image: minio/minio:RELEASE.2025-01-20T14-49-07Z
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 10
minio-init:
image: minio/mc:RELEASE.2025-01-17T23-25-50Z
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 minioadmin minioadmin &&
mc mb --ignore-existing local/procella-checkpoints &&
echo 'bucket ready'
"
restart: "no"
procella:
<<: *procella
profiles: [dev]
ports:
- "9090:9090"
procella-cluster:
<<: *procella
profiles: [cluster]
deploy:
replicas: 3
migrate:
build:
context: .
target: build
profiles: [dev, cluster]
depends_on:
postgres:
condition: service_healthy
environment:
PROCELLA_DATABASE_URL: "postgres://procella:procella@postgres:5432/procella?sslmode=disable"
entrypoint: ["bun", "drizzle-kit", "migrate", "--config", "packages/db/drizzle.config.ts"]
restart: "no"
procella-ui:
build:
context: .
dockerfile: apps/ui/Dockerfile
profiles: [cluster]
depends_on:
procella-cluster:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:80/ || exit 1"]
interval: 5s
timeout: 3s
retries: 5
caddy:
image: caddy:2-alpine
profiles: [cluster]
depends_on:
procella-cluster:
condition: service_healthy
procella-ui:
condition: service_healthy
ports:
- "9090:9090"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
volumes:
postgres-data:
minio-data: