services:
  calendar-backend:
    build:
      context: .
      dockerfile: ./backend/Dockerfile
    ports:
      - "3000:3000"
    volumes:
      - ./data/db:/db

  calendar-frontend:
    image: caddy
    environment:
      - BACKEND_API_URL=http://localhost:3000/api
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./frontend/dist:/srv/www:ro
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
      - ./data/caddy/data:/data
      - ./data/caddy/config:/config
