Skip to content

Commit

Permalink
feat: add ntfy
Browse files Browse the repository at this point in the history
  • Loading branch information
johackim committed Apr 30, 2023
1 parent b785a87 commit fa824af
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
40 changes: 40 additions & 0 deletions stacks/ntfy.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
}

0 comments on commit fa824af

Please sign in to comment.