From 2f9ed4e8e9b1ffa1584e4d899a24621ece23431e Mon Sep 17 00:00:00 2001 From: "Dejan R." Date: Sun, 23 Nov 2025 17:27:42 +0000 Subject: [PATCH] First init script --- docker-compose.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b838556 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,36 @@ +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