Files
calendars/compose.yaml
Sylvain Zimmer 9c18f96090 (all) add organizations, resources, channels, and infra migration (#34)
Add multi-tenant organization model populated from OIDC claims with
org-scoped user discovery, CalDAV principal filtering, and cross-org
isolation at the SabreDAV layer.

Add bookable resource principals (rooms, equipment) with CalDAV
auto-scheduling that handles conflict detection, auto-accept/decline,
and org-scoped booking enforcement. Fixes #14.

Replace CalendarSubscriptionToken with a unified Channel model
supporting CalDAV integration tokens and iCal feed URLs, with
encrypted token storage and role-based access control. Fixes #16.

Migrate task queue from Celery to Dramatiq with async ICS import,
progress tracking, and task status polling endpoint.

Replace nginx with Caddy for both the reverse proxy and frontend
static serving. Switch frontend package manager from yarn/pnpm to
npm and upgrade Node to 24, Next.js to 16, TypeScript to 5.9.

Harden security with fail-closed entitlements, RSVP rate limiting
and token expiry, CalDAV proxy path validation blocking internal
API routes, channel path scope enforcement, and ETag-based
conflict prevention.

Add frontend pages for resource management and integration channel
CRUD, with resource booking in the event modal.

Restructure CalDAV paths to /calendars/users/ and
/calendars/resources/ with nested principal collections in SabreDAV.
2026-03-09 09:09:34 +01:00

164 lines
3.9 KiB
YAML

name: calendars
services:
# Shared PostgreSQL for all services (calendar, caldav server, keycloak)
postgresql:
image: postgres:15
ports:
- "8936:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
interval: 1s
timeout: 2s
retries: 300
env_file:
- env.d/development/postgresql.defaults
- env.d/development/postgresql.local
redis:
image: redis:5
ports:
- "8934:6379"
mailcatcher:
image: sj26/mailcatcher:latest
ports:
- "8937:1080"
backend-dev:
build:
context: src/backend
target: backend-development
args:
DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000}
image: calendars:backend-development
environment:
- PYLINTHOME=/app/.pylint.d
- DJANGO_CONFIGURATION=Development
env_file:
- env.d/development/backend.defaults
- env.d/development/backend.local
ports:
- "8931:8000"
volumes:
- ./src/backend:/app
- ./data/static:/data/static
- ./src/frontend/apps/calendars/src/features/i18n/translations.json:/data/translations.json:ro
- /app/.venv
networks:
- lasuite
- default
depends_on:
postgresql:
condition: service_healthy
restart: true
mailcatcher:
condition: service_started
redis:
condition: service_started
worker-dev:
condition: service_started
caldav:
condition: service_started
worker-dev:
user: ${DOCKER_USER:-1000}
image: calendars:backend-development
networks:
- default
- lasuite
command: [ "python", "worker.py", "-v", "2" ]
environment:
- DJANGO_CONFIGURATION=Development
env_file:
- env.d/development/backend.defaults
- env.d/development/backend.local
volumes:
- ./src/backend:/app
- ./data/static:/data/static
- ./src/frontend/apps/calendars/src/features/i18n/translations.json:/data/translations.json:ro
- /app/.venv
frontend-dev:
user: "${DOCKER_USER:-1000}"
build:
context: src/frontend
target: calendars-dev
args:
API_ORIGIN: "http://localhost:8931"
image: calendars:frontend-development
env_file:
- env.d/development/frontend.defaults
- env.d/development/frontend.local
volumes:
- ./src/frontend/:/home/frontend/
- /home/frontend/node_modules
- /home/frontend/apps/calendars/node_modules
ports:
- "8930:3000"
node:
image: node:24
user: "${DOCKER_USER:-1000}"
environment:
HOME: /tmp
volumes:
- ".:/app"
# CalDAV Server
caldav:
build:
context: src/caldav
ports:
- "8932:80"
env_file:
- env.d/development/caldav.defaults
- env.d/development/caldav.local
volumes:
- ./src/caldav/server.php:/var/www/sabredav/server.php
- ./src/caldav/src:/var/www/sabredav/src
- ./src/caldav/sql:/var/www/sabredav/sql
- ./src/caldav/init-database.sh:/usr/local/bin/init-database.sh
networks:
- default
- lasuite
depends_on:
postgresql:
condition: service_healthy
command: >
sh -c "
/usr/local/bin/init-database.sh || true &&
apache2-foreground
"
# Keycloak - now using shared PostgreSQL
keycloak:
image: quay.io/keycloak/keycloak:26.3.2
volumes:
- ./docker/auth/realm.json:/opt/keycloak/data/import/realm.json
command:
- start-dev
- --features=preview
- --import-realm
- --hostname=http://localhost:8935
- --hostname-strict=false
env_file:
- env.d/development/keycloak.defaults
- env.d/development/keycloak.local
ports:
- "8935:8080"
depends_on:
postgresql:
condition: service_healthy
networks:
- lasuite
- default
networks:
default: {}
lasuite:
name: lasuite-network
driver: bridge
external: true