version: "3.8"

services:
  site:
    image: ${ILIACLOUD_SITE_IMAGE:-iliacloud-site:latest}
    networks:
      - traefik_net
    deploy:
      replicas: 1
      update_config:
        parallelism: 1
        order: start-first
        failure_action: rollback
        monitor: 30s
      rollback_config:
        parallelism: 1
        order: start-first
      labels:
        - traefik.enable=true
        - traefik.http.routers.iliacloud-site.rule=Host(`iliacloud.com`) || Host(`www.iliacloud.com`)
        - traefik.http.routers.iliacloud-site.entrypoints=websecure
        - traefik.http.routers.iliacloud-site.tls.certresolver=letsencrypt
        - traefik.http.services.iliacloud-site.loadbalancer.server.port=80

networks:
  traefik_net:
    external: true
    name: traefik-public
