- docker-compose.cc.yml: database env + calcom DATABASE_URL/DIRECT_URL from .env - cc.env.example: require HEX (URL-safe) secrets; hex generation commands
42 lines
1.9 KiB
YAML
42 lines
1.9 KiB
YAML
# cal.diy — Commons Computer deployment override (cc branch, issue #11)
|
|
#
|
|
# Usage (from the cc branch checkout):
|
|
# docker compose -f docker-compose.yml -f docker-compose.cc.yml build calcom
|
|
# docker compose -f docker-compose.yml -f docker-compose.cc.yml up -d database redis calcom
|
|
#
|
|
# Changes vs upstream docker-compose.yml:
|
|
# 1. Pin every image at a CC-known-good tag (cal.com, postgres, redis) —
|
|
# reproducibility is the point of this branch. NOTE: cal.diy does NOT
|
|
# publish prebuilt release images (Docker Hub: 0 tags; scarf/ghcr: none),
|
|
# so `calcom` is BUILT from source; the image: line is the local tag the
|
|
# build produces (build args come from .env via the base compose file).
|
|
# 2. Keep `calcom-api` (v2 API) and `studio` (Prisma) OUT of the v1 stack via
|
|
# a reserved profile — not part of the first cutover (issue #11).
|
|
|
|
services:
|
|
# The upstream base file hardcodes database creds
|
|
# (unicorn_user/magical_password) and lets compose build DATABASE_URL from the
|
|
# raw POSTGRES_PASSWORD — both break with generated secrets. CC override:
|
|
# database creds come from .env, and DATABASE_URL is built consistently here.
|
|
# NOTE: passwords in .env MUST be URL-safe (hex) — see cc.env.example.
|
|
database:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
|
|
calcom:
|
|
image: calcom.docker.scarf.sh/calcom/cal.diy:v6.2.0
|
|
environment:
|
|
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database/${POSTGRES_DB}
|
|
DATABASE_DIRECT_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database/${POSTGRES_DB}
|
|
|
|
calcom-api:
|
|
profiles: ["off"] # v2 API — add with `--profile api` when needed
|
|
|
|
studio:
|
|
profiles: ["off"] # prisma studio — never in prod; `docker compose run` to use |