version: '3.4' services: hartwig: deploy: replicas: 1 mode: replicated placement: constraints: - node.role == manager - node.hostname == hetzner image: monachus/hugo command: hugo server --bind 0.0.0.0 --port 1313 # ports: # - 8006:1313 labels: - "traefik.enable=true" - traefik.docker.network=traefik-network - traefik.constraint-label=traefik-network - traefik.http.routers.hugo-hartwig-http.middlewares=http-to-https - traefik.http.routers.hugo-hartwig-https.rule=Host(`hartwig.odamus.com`) - traefik.http.routers.hugo-hartwig-https.entrypoints=websecure - traefik.http.routers.hugo-hartwig-http.rule=Host(`hartwig.odamus.com`) - traefik.http.routers.hugo-hartwig-http.entrypoints=web - "traefik.http.routers.hugo-hartwig-https.tls.certresolver=mychallenge" - traefik.http.services.hugo-hartwig.loadbalancer.server.port=1313 volumes: - hugo_blog:/usr/share/blog # - /etc/localtime:/etc/localtime networks: - traefik-network volumes: hugo_blog: name: '{{.Service.Name}}-{{.Task.Slot}}-blog' driver: local networks: traefik-network: external: true