2025-11-23 17:30:12 +00:00
|
|
|
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:
|
2025-12-01 09:26:12 +00:00
|
|
|
- "traefik.enable=true"
|
|
|
|
|
- "traefik.docker.network=traefik_default"
|
2025-11-23 17:30:12 +00:00
|
|
|
|
2025-12-01 09:26:12 +00:00
|
|
|
# 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"
|
2025-11-23 17:30:12 +00:00
|
|
|
|
2025-12-01 09:26:12 +00:00
|
|
|
# HTTPS router (real app traffic)
|
2025-11-23 17:30:12 +00:00
|
|
|
- "traefik.http.routers.gotify.rule=Host(`gotify.rozic-dev.com`)"
|
|
|
|
|
- "traefik.http.routers.gotify.entrypoints=websecure"
|
2025-12-01 09:26:12 +00:00
|
|
|
- "traefik.http.routers.gotify.tls=true"
|
2025-11-23 17:30:12 +00:00
|
|
|
- "traefik.http.routers.gotify.tls.certresolver=letsencrypt"
|
2025-12-01 09:26:12 +00:00
|
|
|
|
|
|
|
|
# Service (internal port inside the Gotify container)
|
2025-11-23 17:30:12 +00:00
|
|
|
- "traefik.http.services.gotify.loadbalancer.server.port=80"
|