version: "3.8" x-defaults: &defaults restart: unless-stopped logging: driver: json-file options: max-size: "10m" max-file: "3" networks: traefik: external: true name: traefik_default default: driver: bridge services: gotify: <<: *defaults image: gotify/server:latest container_name: gotify environment: - TZ=Europe/Ljubljana volumes: - ./data:/app/data networks: - traefik labels: - "traefik.enable=true" - "traefik.docker.network=traefik_default" # HTTP router (plain HTTP, used for ACME + redirect) - "traefik.http.routers.gotify-http.rule=Host(`gotify.rozic-dev.com`)" - "traefik.http.routers.gotify-http.entrypoints=web" - "traefik.http.routers.gotify-http.middlewares=redirect-to-https" # HTTPS router (real app traffic) - "traefik.http.routers.gotify.rule=Host(`gotify.rozic-dev.com`)" - "traefik.http.routers.gotify.entrypoints=websecure" - "traefik.http.routers.gotify.tls=true" - "traefik.http.routers.gotify.tls.certresolver=letsencrypt" # Service (internal port inside the Gotify container) - "traefik.http.services.gotify.loadbalancer.server.port=80"