services:
  downloads:
    image: nginx:alpine
    container_name: rustlite-downloads
    volumes:
      - /opt/rustlite-downloads:/usr/share/nginx/html:ro
      - /opt/rustlite-downloads/nginx.conf:/etc/nginx/conf.d/default.conf:ro
    networks:
      - coolify
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.downloads.rule=Host(`dl.rustlite.com`)"
      - "traefik.http.routers.downloads.entrypoints=https"
      - "traefik.http.routers.downloads.tls.certresolver=letsencrypt"
      - "traefik.http.routers.downloads-http.rule=Host(`dl.rustlite.com`)"
      - "traefik.http.routers.downloads-http.entrypoints=http"
      - "traefik.http.services.downloads.loadbalancer.server.port=80"

networks:
  coolify:
    external: true
