services:
  caddy:
    build:
      context: /opt/caddy/
    container_name: caddy
    environment:
      - DOMAIN=veenboer.xyz
      - SUBDOMAIN=rik
      - AWS_REGION=eu-west-1
      - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:?}
      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:?}
      - GEO_ACCOUNT_ID=${MAXMIND_ACCOUNT_ID:?}
      - GEO_API_KEY=${MAXMIND_API_KEY:?}
      - OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID:?}
      - OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET:?}
    image: caddy
    ports:
      - 443:443
    restart: unless-stopped
    volumes:
      - /opt/caddy/Caddyfile:/etc/caddy/Caddyfile
      - /opt/caddy/conf:/etc/caddy/conf
      - /opt/caddy/sites:/etc/caddy/sites
      - /opt/caddy/data:/data/caddy
      - /opt/caddy/logs:/var/log
    extra_hosts:
      - host:192.168.2.200
