forked from DevOps/deploy.stack
feat: 添加ntfy服务的基础配置和部署文件
添加ntfy服务的Docker Compose部署配置和环境变量文件,包括镜像版本、端口映射、环境变量配置和卷挂载设置
This commit is contained in:
2
ntfy/env.cfg
Normal file
2
ntfy/env.cfg
Normal file
@@ -0,0 +1,2 @@
|
||||
IMAGE_TAG=binwiederhier/ntfy:v2.14
|
||||
Volumes_Path=/data/volumes/ntfy
|
||||
28
ntfy/stack.yml
Normal file
28
ntfy/stack.yml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user