diff --git a/stacks/ntfy.yml b/stacks/ntfy.yml new file mode 100644 index 00000000..efd4d86d --- /dev/null +++ b/stacks/ntfy.yml @@ -0,0 +1,40 @@ +# DOMAIN=example.com docker stack deploy -c ntfy.yml ntfy + +version: '3.8' + +services: + web: + image: binwiederhier/ntfy:${VERSION:-v2.4.0} + entrypoint: /bin/sh + command: + - -c + - | + echo 'auth-file: "/var/lib/ntfy/user.db"' > /etc/ntfy/server.yml + echo 'auth-default-access: "deny-all"' >> /etc/ntfy/server.yml + ntfy user add --role=admin $${ADMIN_USERNAME} + ntfy serve + environment: + - ADMIN_USERNAME=${ADMIN_USERNAME:-admin} + - NTFY_PASSWORD=${ADMIN_PASSWORD:-myp@ssw0rd} + volumes: + - ${VOLUME_PATH}config:/etc/ntfy + - ${VOLUME_PATH}data:/var/lib/ntfy + - ${VOLUME_PATH}cache:/var/cache/ntfy + deploy: + labels: + - traefik.enable=true + - traefik.http.routers.ntfy-${NUMBER:-1}.rule=Host(`${DOMAIN:-ntfy.localhost}`) + - traefik.http.routers.ntfy-${NUMBER:-1}.entrypoints=${SCHEME:-https} + - traefik.http.routers.ntfy-${NUMBER:-1}.service=ntfy-${NUMBER:-1} + - traefik.http.routers.ntfy-${NUMBER:-1}.tls.certresolver=letsencrypt + - traefik.http.services.ntfy-${NUMBER:-1}.loadbalancer.server.port=80 + +volumes: + config: + cache: + data: + +networks: + default: + external: true + name: traefik-net diff --git a/templates.json b/templates.json index 3135018f..cb16f71a 100644 --- a/templates.json +++ b/templates.json @@ -1718,6 +1718,21 @@ "url": "https://github.com/ethibox/awesome-stacks", "stackfile": "stacks/focalboard.yml" } + }, + { + "type": 2, + "title": "Ntfy", + "description": "Alternative open-source à Pushbullet", + "categories": ["Notifications"], + "enabled": false, + "trial": 7, + "price": 19, + "logo": "https://i.imgur.com/xklY3FN.png", + "website": "https://ntfy.sh/", + "repository": { + "url": "https://github.com/ethibox/awesome-stacks", + "stackfile": "stacks/ntfy.yml" + } } ] }