forked from openstatusHQ/openstatus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoolify-deployment.yaml
More file actions
356 lines (329 loc) · 9.62 KB
/
coolify-deployment.yaml
File metadata and controls
356 lines (329 loc) · 9.62 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# Coolify Deployment Configuration
# This file uses environment variables that can be configured directly in Coolify
#
# 🔧 REQUIRED: Set these environment variables in Coolify:
# DATABASE_URL=http://libsql:8080
# DATABASE_AUTH_TOKEN= (leave empty for local libsql)
# AUTH_SECRET=your-32-character-secret
# NEXT_PUBLIC_URL=https://your-domain.com
# RESEND_API_KEY=your-resend-api-key
#
# 📚 Full Guide: See COOLIFY_ENVIRONMENT_GUIDE.md
#
# 🚀 Quick Import URL:
# https://raw.githubusercontent.com/openstatusHQ/openstatus/main/coolify-deployment.yaml
version: "3.8"
# Environment variable definitions with defaults
x-common-variables: &common-env # Database Configuration
DATABASE_URL: ${DATABASE_URL:-http://libsql:8080}
DATABASE_AUTH_TOKEN: ${DATABASE_AUTH_TOKEN:-}
# Authentication
AUTH_SECRET: ${AUTH_SECRET:-default-secret-change-me}
NEXT_PUBLIC_URL: ${NEXT_PUBLIC_URL:-http://localhost:3002}
SELF_HOST: ${SELF_HOST:-true}
# OAuth Providers (Optional)
AUTH_GITHUB_ID: ${AUTH_GITHUB_ID:-}
AUTH_GITHUB_SECRET: ${AUTH_GITHUB_SECRET:-}
AUTH_GOOGLE_ID: ${AUTH_GOOGLE_ID:-}
AUTH_GOOGLE_SECRET: ${AUTH_GOOGLE_SECRET:-}
# Email Service
RESEND_API_KEY: ${RESEND_API_KEY:-}
# Analytics (Optional)
TINY_BIRD_API_KEY: ${TINY_BIRD_API_KEY:-}
TINYBIRD_URL: ${TINYBIRD_URL:-}
# Redis/Queue (Optional)
UPSTASH_REDIS_REST_URL: ${UPSTASH_REDIS_REST_URL:-http://localhost:6379}
UPSTASH_REDIS_REST_TOKEN: ${UPSTASH_REDIS_REST_TOKEN:-}
QSTASH_CURRENT_SIGNING_KEY: ${QSTASH_CURRENT_SIGNING_KEY:-}
QSTASH_NEXT_SIGNING_KEY: ${QSTASH_NEXT_SIGNING_KEY:-}
QSTASH_TOKEN: ${QSTASH_TOKEN:-}
QSTASH_URL: ${QSTASH_URL:-https://qstash.upstash.io/v1/publish/}
# Google Cloud (Optional)
GCP_PROJECT_ID: ${GCP_PROJECT_ID:-}
GCP_LOCATION: ${GCP_LOCATION:-}
GCP_CLIENT_EMAIL: ${GCP_CLIENT_EMAIL:-}
GCP_PRIVATE_KEY: ${GCP_PRIVATE_KEY:-}
CRON_SECRET: ${CRON_SECRET:-}
# API Keys (Optional)
UNKEY_API_ID: ${UNKEY_API_ID:-}
UNKEY_TOKEN: ${UNKEY_TOKEN:-}
SUPER_ADMIN_TOKEN: ${SUPER_ADMIN_TOKEN:-}
FLY_REGION: ${FLY_REGION:-self-hosted}
# Stripe (Optional)
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-}
STRIPE_WEBHOOK_SECRET_KEY: ${STRIPE_WEBHOOK_SECRET_KEY:-}
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: ${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY:-}
# Vercel (Optional)
PROJECT_ID_VERCEL: ${PROJECT_ID_VERCEL:-}
TEAM_ID_VERCEL: ${TEAM_ID_VERCEL:-}
VERCEL_AUTH_BEARER_TOKEN: ${VERCEL_AUTH_BEARER_TOKEN:-}
BLOB_READ_WRITE_TOKEN: ${BLOB_READ_WRITE_TOKEN:-}
# Observability (Optional)
NEXT_PUBLIC_SENTRY_DSN: ${NEXT_PUBLIC_SENTRY_DSN:-}
SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN:-}
NEXT_PUBLIC_OPENPANEL_CLIENT_ID: ${NEXT_PUBLIC_OPENPANEL_CLIENT_ID:-}
OPENPANEL_CLIENT_SECRET: ${OPENPANEL_CLIENT_SECRET:-}
PAGERDUTY_APP_ID: ${PAGERDUTY_APP_ID:-}
SLACK_SUPPORT_WEBHOOK_URL: ${SLACK_SUPPORT_WEBHOOK_URL:-}
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-}
# External Services
OPENSTATUS_INGEST_URL: ${OPENSTATUS_INGEST_URL:-https://openstatus-private-location.fly.dev}
SCREENSHOT_SERVICE_URL: ${SCREENSHOT_SERVICE_URL:-}
# Development & Testing
TURBO_ENV_MODE: ${TURBO_ENV_MODE:-loose}
PLAYGROUND_UNKEY_API_KEY: ${PLAYGROUND_UNKEY_API_KEY:-}
WORKSPACES_LOOKBACK_30: ${WORKSPACES_LOOKBACK_30:-}
WORKSPACES_HIDE_URL: ${WORKSPACES_HIDE_URL:-}
# Common Settings
NODE_ENV: ${NODE_ENV:-production}
ENCRYPTION_KEY: ${ENCRYPTION_KEY:-default-encryption-key}
x-service-variables: &service-env
<<: *common-env
PORT: ${PORT:-3000}
networks:
openstatus:
driver: bridge
name: openstatus
volumes:
libsql-data:
name: openstatus-libsql-data
services:
# External Dependencies
libsql:
image: ghcr.io/tursodatabase/libsql-server:latest
container_name: openstatus-libsql
networks:
- openstatus
ports:
- "8085:8080"
- "5001:5001"
volumes:
- libsql-data:/var/lib/sqld
environment:
- SQLD_NODE=primary
healthcheck:
test:
[
"CMD",
"sh",
"-c",
'perl -e ''use IO::Socket::INET; exit(IO::Socket::INET->new(PeerAddr=>"127.0.0.1:8080",Timeout=>1) ? 0 : 1);''',
]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
tinybird:
image: tinybirdco/tinybird-local:latest
container_name: openstatus-tinybird
networks:
- openstatus
ports:
- "7181:7181"
environment:
- COMPATIBILITY_MODE=1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7181/"]
interval: 15s
timeout: 5s
retries: 5
start_period: 20s
restart: unless-stopped
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
# Core OpenStatus Services
workflows:
image: ghcr.io/openstatushq/openstatus-workflows:latest
container_name: openstatus-workflows
networks:
- openstatus
ports:
- "3000:3000"
volumes:
- ./data:/app/data
environment:
- DATABASE_URL=${DATABASE_URL:-http://libsql:8080}
- DATABASE_AUTH_TOKEN=${DATABASE_AUTH_TOKEN:-}
- PORT=${WORKFLOWS_PORT:-3000}
depends_on:
libsql:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/ping"]
interval: 15s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
server:
image: ghcr.io/openstatushq/openstatus-server:latest
container_name: openstatus-server
networks:
- openstatus
ports:
- "3001:3000"
environment:
- DATABASE_URL=${DATABASE_URL:-http://libsql:8080}
- DATABASE_AUTH_TOKEN=${DATABASE_AUTH_TOKEN:-}
- PORT=${SERVER_PORT:-3000}
depends_on:
workflows:
condition: service_healthy
libsql:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/ping"]
interval: 15s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
private-location:
image: ghcr.io/openstatushq/openstatus-private-location:latest
container_name: openstatus-private-location
networks:
- openstatus
ports:
- "8083:8080"
environment:
- DB_URL=${DATABASE_URL:-http://libsql:8080}
- TINYBIRD_URL=${TINYBIRD_URL:-http://tinybird:7181}
- GIN_MODE=release
- PORT=${PRIVATE_LOCATION_PORT:-8080}
depends_on:
server:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/health"]
interval: 15s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
checker:
image: ghcr.io/openstatushq/openstatus-checker:latest
container_name: openstatus-checker
networks:
- openstatus
ports:
- "8082:8080"
environment:
- DATABASE_URL=${DATABASE_URL:-http://libsql:8080}
- DATABASE_AUTH_TOKEN=${DATABASE_AUTH_TOKEN:-}
- PORT=${CHECKER_PORT:-8080}
depends_on:
server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 15s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
dashboard:
image: ghcr.io/openstatushq/openstatus-dashboard:latest
container_name: openstatus-dashboard
networks:
- openstatus
ports:
- "3002:3000"
environment:
- DATABASE_URL=${DATABASE_URL:-http://libsql:8080}
- DATABASE_AUTH_TOKEN=${DATABASE_AUTH_TOKEN:-}
- PORT=${DASHBOARD_PORT:-3000}
- HOSTNAME=${DASHBOARD_HOSTNAME:-0.0.0.0}
- AUTH_TRUST_HOST=${DASHBOARD_AUTH_TRUST_HOST:-true}
depends_on:
workflows:
condition: service_healthy
libsql:
condition: service_healthy
server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 15s
timeout: 10s
retries: 3
start_period: 45s
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
status-page:
image: ghcr.io/openstatushq/openstatus-status-page:latest
container_name: openstatus-status-page
networks:
- openstatus
ports:
- "3003:3000"
environment:
- DATABASE_URL=${DATABASE_URL:-http://libsql:8080}
- DATABASE_AUTH_TOKEN=${DATABASE_AUTH_TOKEN:-}
- PORT=${STATUS_PAGE_PORT:-3000}
- HOSTNAME=${STATUS_PAGE_HOSTNAME:-0.0.0.0}
- AUTH_TRUST_HOST=${STATUS_PAGE_AUTH_TRUST_HOST:-true}
depends_on:
workflows:
condition: service_healthy
libsql:
condition: service_healthy
server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 15s
timeout: 10s
retries: 3
start_period: 45s
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
# Coolify-specific labels for better management
x-coolify-labels:
app: openstatus
version: "1.0"
environment: production