services:
  radicale:
    image: tomsquest/docker-radicale:latest
    container_name: radicale
    restart: unless-stopped
    environment:
      - TZ=${TZ}
      - RADICALE_USERNAME=${RADICALE_USERNAME}
      - RADICALE_PASSWORD=${RADICALE_PASSWORD}
    volumes:
      - ./data:/data
      - ./config:/config
    ports:
      - "${RADICALE_PORT}:5232"
    networks:
      - caldav_net

  infcloud:
    image: nginx:alpine
    container_name: infcloud
    restart: unless-stopped
    depends_on:
      - radicale
    environment:
      - TZ=${TZ}
    ports:
      - "${INFCLOUD_PORT}:80"
    volumes:
      - ./infcloud_config:/usr/share/nginx/html:ro
      - ./infcloud_config/nginx-simple.conf:/etc/nginx/conf.d/default.conf:ro
    networks:
      - caldav_net

networks:
  caldav_net:
    driver: bridge
