services: ntfy: image: binwiederhier/ntfy:latest container_name: ntfy restart: unless-stopped command: ["serve"] # ← start the server environment: - TZ=Europe/Ljubljana - NTFY_BASE_URL=https://ntfy.rozic-dev.com - NTFY_BEHIND_PROXY=true - NTFY_CACHE_FILE=/var/lib/ntfy/cache.db - NTFY_ATTACHMENT_CACHE_DIR=/var/lib/ntfy/attachments volumes: # - ./ntfy-data:/var/lib/ntfy # persistent data # - /.var/cache/ntfy:/var/cache/ntfy # - /.etc/ntfy:/etc/ntfy # map config file and persistent caches - ./etc:/etc/ntfy - ./ntfy-cache:/var/cache/ntfy # # store auth.db under /var/lib/ntfy (created automatically) - ./ntfy-data:/var/lib/ntfy labels: - "traefik.enable=true" - "traefik.http.routers.ntfy.rule=Host(`ntfy.rozic-dev.com`)" - "traefik.http.routers.ntfy.entrypoints=websecure" - "traefik.http.routers.ntfy.tls=true" - "traefik.http.routers.ntfy.tls.certresolver=letsencrypt" - "traefik.http.middlewares.ntfy-compress.compress=true" - "traefik.http.routers.ntfy.middlewares=ntfy-compress" - "traefik.http.services.ntfy.loadbalancer.server.port=80" networks: - traefik_default networks: traefik_default: external: true