Files
app-catalog-felhom.eu/templates/calcom/docker-compose.yml
T
admin 342a389f3d calcom: add DATABASE_DIRECT_URL (required by Prisma; migrations failed without it)
Cal.com's prisma schema declares directUrl=env(DATABASE_DIRECT_URL); without it the
startup 'prisma migrate deploy' fails (P1012) and the schema stays incomplete -> the app
500s. Set to the same direct Postgres URL. Pre-existing, never caught (bad image pin
meant calcom never deployed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 13:42:15 +02:00

88 lines
3.0 KiB
YAML

# Cal.com - Nyílt forráskódú időpontfoglaló (Calendly alternatíva)
# Domain: ${SUBDOMAIN}.${DOMAIN}
# Database: postgres
# RAM: ~200M (mem_limit: 768M) | Pi-compatible: No
#
# Environment variables:
# DOMAIN - Your domain (e.g., demo-felhom.eu)
# NEXTAUTH_SECRET - NextAuth titkosítási kulcs (auto-generated)
# CALENDSO_ENCRYPTION_KEY- Titkosítási kulcs (auto-generated)
# DB_PASSWORD - Adatbázis jelszó (auto-generated)
services:
calcom:
image: calcom/cal.com:v4.6.9
container_name: calcom
restart: unless-stopped
depends_on:
calcom-postgres:
condition: service_healthy
environment:
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY}
- DATABASE_URL=postgresql://calcom:${DB_PASSWORD}@calcom-postgres:5432/calcom
# Cal.com's Prisma schema requires directUrl too; without it `prisma migrate deploy` fails on
# startup and the DB schema stays incomplete (500s on /api/health). Same direct Postgres URL.
- DATABASE_DIRECT_URL=postgresql://calcom:${DB_PASSWORD}@calcom-postgres:5432/calcom
- NEXT_PUBLIC_WEBAPP_URL=https://${SUBDOMAIN}.${DOMAIN}
- NEXTAUTH_URL=https://${SUBDOMAIN}.${DOMAIN}
# App-email (managed relay). Injected by the controller only when app-email is on (global + per-app);
# empty EMAIL_SERVER_HOST keeps Cal.com mail disabled. Cal.com uses the plaintext :2526 listener
# (tls_mode=plaintext) — it can't accept the self-signed STARTTLS cert. See .felhom.yml smtp_mapping.
- EMAIL_FROM=${EMAIL_FROM:-}
- EMAIL_FROM_NAME=${EMAIL_FROM_NAME:-Felhom}
- EMAIL_SERVER_HOST=${EMAIL_SERVER_HOST:-}
- EMAIL_SERVER_PORT=${EMAIL_SERVER_PORT:-587}
networks:
- traefik-public
- calcom-internal
deploy:
resources:
limits:
memory: 768M
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.calcom.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.calcom.entrypoints=websecure"
- "traefik.http.routers.calcom.tls=true"
- "traefik.http.routers.calcom.tls.certresolver=letsencrypt"
- "traefik.http.services.calcom.loadbalancer.server.port=3000"
calcom-postgres:
image: postgres:16-alpine
container_name: calcom-postgres
restart: unless-stopped
environment:
- POSTGRES_USER=calcom
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=calcom
- TZ=Europe/Budapest
volumes:
- calcom_postgres_data:/var/lib/postgresql/data
networks:
- calcom-internal
deploy:
resources:
limits:
memory: 256M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U calcom -d calcom"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
volumes:
calcom_postgres_data:
networks:
traefik-public:
external: true
calcom-internal: