version: '1' networks: default: name: "${TRAEFIK_NETWORK}" external: true services: watchtower: image: "containrrr/watchtower" container_name: "${PROJECT_NAME}_watchtower" hostname: "${PROJECT_URL}" restart: "unless-stopped" environment: - "WATCHTOWER_NOTIFICATIONS=gotify" - "WATCHTOWER_NOTIFICATION_GOTIFY_URL=http://${GOTIFY_URL}" - "WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN=${GOTIFY_TOKEN}" - "WATCHTOWER_CLEANUP=true" - "WATCHTOWER_LABEL_ENABLE=true" - "WATCHTOWER_INCLUDE_RESTARTING=true" - "WATCHTOWER_ROLLING_RESTARTING=true" - "WATCHTOWER_INTERVAL=200" - "WATCHTOWER_INCLUDE_STOPPED=true" security_opt: - "no-new-privileges:true" volumes: - "/etc/timezone:/etc/timezone:ro" - "/etc/localtime:/etc/localtime:ro" - "/var/run/docker.sock:/var/run/docker.sock" labels: # Watchtower add to auto update - "com.centurylinklabs.watchtower.enable=true" # traefik - "traefikf.enable=true" - "traefik.docker.network=${TRAEFIK_NETWORK}" - "traefik.http.routers.${PROJECT_NAME}_watchtower.entrypoints=websecure" - "traefik.http.routers.${PROJECT_NAME}_watchtower.rule=Host(`${PROJECT_URL}`)" - "traefik.http.routers.${PROJECT_NAME}_watchtower.tls=true" - "traefik.http.services.${PROJECT_NAME}_watchtower.loadbalancer.server.port=3000"