Repository navigation
Expand file tree
/
Copy pathdocker-compose.coolify.yml
More file actions
92 lines (82 loc) · 2.93 KB
/
Copy pathdocker-compose.coolify.yml
File metadata and controls
92 lines (82 loc) · 2.93 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
# docker-compose.coolify.yml — Procella on Coolify
#
# Setup:
# 1. Coolify Dashboard → Projects → New Resource → Docker Compose
# 2. Connect your Git repo
# 3. Set compose file path to docker-compose.coolify.yml
# 4. Set secrets in Coolify UI → Environment Variables
#
# Docs: https://coolify.io/docs/knowledge-base/docker/compose
services:
procella:
build:
context: .
dockerfile: Dockerfile
# Or use a pre-built image:
# image: ghcr.io/your-org/procella:latest
environment: &procella-environment
PROCELLA_LISTEN_ADDR: ":9090"
PROCELLA_AUTH_MODE: "dev"
PROCELLA_BLOB_BACKEND: "s3"
PROCELLA_BLOB_S3_REGION: "us-east-1"
# Sensitive — set in Coolify UI, substituted at deploy time
PROCELLA_DATABASE_URL: "${PROCELLA_DATABASE_URL}"
PROCELLA_DEV_AUTH_TOKEN: "${PROCELLA_DEV_AUTH_TOKEN}"
PROCELLA_ENCRYPTION_KEY: "${PROCELLA_ENCRYPTION_KEY}"
# 32+ chars; the server refuses to start without it.
PROCELLA_TICKET_SIGNING_KEY: "${PROCELLA_TICKET_SIGNING_KEY}"
PROCELLA_DESCOPE_PROJECT_ID: "${PROCELLA_DESCOPE_PROJECT_ID}"
PROCELLA_DESCOPE_MANAGEMENT_KEY: "${PROCELLA_DESCOPE_MANAGEMENT_KEY}"
PROCELLA_BLOB_S3_BUCKET: "${PROCELLA_BLOB_S3_BUCKET}"
PROCELLA_BLOB_S3_ENDPOINT: "${PROCELLA_BLOB_S3_ENDPOINT}"
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
labels:
- traefik.enable=true
- "traefik.http.routers.procella.rule=Host(`procella.your-domain.com`)"
- traefik.http.routers.procella.entryPoints=https
- traefik.http.routers.procella.tls.certresolver=letsencrypt
- traefik.http.services.procella.loadbalancer.server.port=9090
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
restart: unless-stopped
healthcheck:
test: ["CMD", "/procella", "--healthz"]
interval: 15s
timeout: 5s
retries: 3
start_period: 20s
# One-shot migration gate: the server image ships /migrations, so the same
# image applies the schema before any replica starts serving.
migrate:
build:
context: .
dockerfile: Dockerfile
command: ["--migrate", "/migrations"]
environment: *procella-environment
depends_on:
db:
condition: service_healthy
restart: "no"
db:
image: postgres:18-alpine
environment:
POSTGRES_DB: procella
POSTGRES_USER: procella
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
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.
- procella_pgdata:/var/lib/postgresql
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U procella -d procella"]
interval: 10s
timeout: 5s
retries: 5
volumes:
procella_pgdata:
driver: local