Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (103 loc) · 3.97 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (103 loc) · 3.97 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
# AutoSEO Cloud — Docker Compose for Coolify ("Docker Compose" build pack, base directory /cloud).
# Two apps in one resource (docs/CLOUD.md), so a single push to main updates both:
# cloud — marketing site, accounts, billing, admin (autoseo.codext.de)
# app — the shared AutoSEO instance every customer workspace lives in (app.autoseo.codext.de), built from the
# repository root. The shared secrets are generated by Coolify (SERVICE_PASSWORD_64_*), never typed by hand.
# Configurable here: DOMAIN, APP_DOMAIN, ADMIN_EMAILS, OPERATOR_EMAIL, OPERATOR_WORKSPACE. Stripe, SMTP and (for
# dedicated instances) Coolify are set up in /admin.
services:
cloud:
build:
context: .
restart: unless-stopped
environment:
# Coolify: set the domain (https://autoseo.codext.de) on this service; it also exposes SERVICE_FQDN_CLOUD_3000.
- SERVICE_FQDN_CLOUD_3000
- DOMAIN=${DOMAIN:-autoseo.codext.de}
- ADMIN_EMAILS=${ADMIN_EMAILS:-}
# Receives the weekly growth digest (falls back to the first ADMIN_EMAILS entry).
- OPERATOR_EMAIL=${OPERATOR_EMAIL:-}
- DATABASE_URL=postgres://cloud:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/cloud
- DATA_DIR=/data
# Shared app tenant API (internal Docker network) and the public URL customers open.
- CLOUD_APP_INTERNAL_URL=http://app:3000
- CLOUD_APP_URL=https://${APP_DOMAIN:-app.autoseo.codext.de}
- CLOUD_API_SECRET=${SERVICE_PASSWORD_64_CLOUDAPI}
- CLOUD_SSO_SECRET=${SERVICE_PASSWORD_64_CLOUDSSO}
volumes:
- cloud-data:/data
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3000/api/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 40s
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=cloud
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRES_DB=cloud
volumes:
- cloud-pg:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cloud -d cloud"]
interval: 5s
timeout: 5s
retries: 20
app:
build:
# The open-source app at the repository root (its own Dockerfile and .dockerignore).
context: ..
dockerfile: Dockerfile
args:
SOURCE_COMMIT: ${SOURCE_COMMIT:-}
restart: unless-stopped
mem_limit: 3g
environment:
# The domain (https://app.autoseo.codext.de) is set on this service in the Coolify UI; the app reads DOMAIN.
# No bare SERVICE_FQDN_APP_3000 entry: without a domain Coolify turns it into "0: SERVICE_FQDN_APP_3000".
- DOMAIN=${APP_DOMAIN:-app.autoseo.codext.de}
- DATABASE_URL=postgres://autoseo:${SERVICE_PASSWORD_APPDB}@app-postgres:5432/autoseo
- DATA_DIR=/data
# Operator account + workspace, created on first boot (instance admin).
- AUTOSEO_OWNER_EMAIL=${OPERATOR_EMAIL:-}
- AUTOSEO_WORKSPACE_NAME=${OPERATOR_WORKSPACE:-AutoSEO Cloud}
# Managed mode: tenant API for the cloud, SSO from the cloud dashboard, billing links.
- AUTOSEO_CLOUD_URL=https://${DOMAIN:-autoseo.codext.de}
- AUTOSEO_CLOUD_API_SECRET=${SERVICE_PASSWORD_64_CLOUDAPI}
- AUTOSEO_SSO_SECRET=${SERVICE_PASSWORD_64_CLOUDSSO}
volumes:
- app-data:/data
depends_on:
app-postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3000/api/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 60s
app-postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=autoseo
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_APPDB}
- POSTGRES_DB=autoseo
volumes:
- app-pg:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U autoseo -d autoseo"]
interval: 5s
timeout: 5s
retries: 20
volumes:
cloud-data:
cloud-pg:
app-data:
app-pg: