added user information and healthcheck

This commit is contained in:
2026-04-28 22:16:41 -07:00
parent a60b7f4cb2
commit 818bef02e9
2 changed files with 13 additions and 0 deletions
+6
View File
@@ -1,3 +1,9 @@
# User ID the container process runs as
PUID=1000
# Group ID the container process runs as
PGID=1000
# Port to expose ntfy on the host # Port to expose ntfy on the host
NTFY_PORT=80 NTFY_PORT=80
+7
View File
@@ -2,6 +2,7 @@ services:
ntfy: ntfy:
image: binwiederhier/ntfy:latest image: binwiederhier/ntfy:latest
container_name: ntfy container_name: ntfy
user: "${PUID}:${PGID}"
ports: ports:
- "${NTFY_PORT}:80" - "${NTFY_PORT}:80"
volumes: volumes:
@@ -10,6 +11,12 @@ services:
environment: environment:
- TZ=${TZ} - TZ=${TZ}
command: serve command: serve
healthcheck:
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -o '\"healthy\":true' || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
deploy: deploy:
resources: resources:
limits: limits: