diff --git a/ntfy/stack.yml b/ntfy/stack.yml new file mode 100644 index 0000000..6b25988 --- /dev/null +++ b/ntfy/stack.yml @@ -0,0 +1,28 @@ +# mkdir -pv /data/volumes/ntfy/{cache,etc} +# pull:: docker compose -p ntfy --env-file ./ntfy/env.cfg -f ./ntfy/stack.yml pull +# run:: docker compose -p ntfy --env-file ./ntfy/env.cfg -f ./ntfy/stack.yml up -d + +services: + ntfy: + image: ${IMAGE_TAG} + container_name: ntfy + #tty: true + stdin_open: true + command: + serve + restart: unless-stopped + ports: + - '5480:80' + environment: + - TZ=Asia/Shanghai + - NTFY_CACHE_FILE=/var/lib/ntfy/cache.db #缓存数据 + - NTFY_AUTH_FILE=/var/lib/ntfy/auth.db #授权数据 + - NTFY_AUTH_DEFAULT_ACCESS=deny-all #禁用非授权访问 + - NTFY_BEHIND_PROXY=true + - NTFY_ATTACHMENT_CACHE_DIR=/var/lib/ntfy/attachments #设置附件缓存目录 + - NTFY_ENABLE_LOGIN=true #开启登录授权访问 + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + - ${Volumes_Path}/cache:/var/cache/ntfy + - ${Volumes_Path}/etc:/etc/ntfy/ntfy.conf