services:
  mealie:
    restart: unless-stopped
    image: ghcr.io/mealie-recipes/mealie:latest

    volumes:
      - /home/docker/DenBite/data:/app/data

    environment:
      - ALLOW_SIGNUP=false
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris

      - BASE_URL=https://mealie.luckyden.org

      - MAX_WORKERS=1
      - WEB_CONCURRENCY=1
      - TRUSTED_PROXIES=10.10.0.20

    networks:
      tan-network:
        ipv4_address: 10.10.0.100

    labels:
      - traefik.enable=true

      # ROUTER
      - traefik.http.routers.mealie.rule=Host(`mealie.luckyden.org`)
      - traefik.http.routers.mealie.entrypoints=websecure
      - traefik.http.routers.mealie.tls.certresolver=cloudflare

      # SERVICE
      - traefik.http.services.mealie.loadbalancer.server.port=9000

      # HEADERS (important)
      - traefik.http.middlewares.mealie.headers.customrequestheaders.X-Forwarded-Proto=https

      - traefik.http.routers.mealie.middlewares=mealie

networks:
  tan-network:
    external: true
