-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.coolify.yaml
More file actions
65 lines (62 loc) · 2.29 KB
/
Copy pathcompose.coolify.yaml
File metadata and controls
65 lines (62 loc) · 2.29 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
# Canvas Notebook — Coolify / managed platform deployment (Postgres mode).
#
# This compose file is designed for Coolify and similar platforms that:
# - inject environment variables via the UI
# - auto-generate secrets via $SERVICE_PASSWORD_* and $SERVICE_USER_* variables
# - handle routing/SSL automatically (no ports needed)
#
# Coolify auto-generates:
# $SERVICE_PASSWORD_POSTGRES — postgres password
# $SERVICE_USER_POSTGRES — postgres username
# $SERVICE_PASSWORD_AUTH — used as BETTER_AUTH_SECRET
# $SERVICE_PASSWORD_API_KEY — used as CANVAS_INTERNAL_API_KEY
# SERVICE_URL_CANVAS_NOTEBOOK — public URL of the service
#
# You can override any of these in Coolify's environment editor.
services:
canvas-notebook:
image: 'ghcr.io/canvascoding/canvas-notebook:latest'
environment:
- SERVICE_URL_CANVAS_NOTEBOOK_3000
- 'BASE_URL=${SERVICE_URL_CANVAS_NOTEBOOK:-http://localhost:3000}'
- 'BETTER_AUTH_BASE_URL=${SERVICE_URL_CANVAS_NOTEBOOK:-http://localhost:3000}'
- BETTER_AUTH_SECRET=$SERVICE_PASSWORD_AUTH
- CANVAS_INTERNAL_API_KEY=$SERVICE_PASSWORD_API_KEY
- CANVAS_DATABASE_PROVIDER=postgres
- CANVAS_POSTGRES_MODE=managed
- 'DATABASE_URL=postgresql://$SERVICE_USER_POSTGRES:$SERVICE_PASSWORD_POSTGRES@postgres:5432/${POSTGRES_DB:-canvas_notebook}'
- 'CANVAS_POSTGRES_VECTOR_ENABLED=${CANVAS_POSTGRES_VECTOR_ENABLED:-true}'
- 'LOG_LEVEL=${LOG_LEVEL:-info}'
- CANVAS_DEPLOYMENT_PLATFORM=coolify
volumes:
- 'canvas-data:/data'
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- 'curl -fsS http://127.0.0.1:3000/api/health || exit 1'
interval: 5s
timeout: 20s
retries: 10
restart: unless-stopped
postgres:
image: 'pgvector/pgvector:0.8.3-pg18'
environment:
- POSTGRES_USER=$SERVICE_USER_POSTGRES
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- 'POSTGRES_DB=${POSTGRES_DB:-canvas_notebook}'
volumes:
- 'canvas-postgres-data:/var/lib/postgresql'
healthcheck:
test:
- CMD-SHELL
- 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'
interval: 5s
timeout: 20s
retries: 10
restart: unless-stopped
volumes:
canvas-data:
canvas-postgres-data: