Files
calendars/compose.yaml

166 lines
4.0 KiB
YAML
Raw Normal View History

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
volumes:
- ./docker/postgresql/init-databases.sh:/docker-entrypoint-initdb.d/init-databases.sh:ro
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