# mkdir -pv /data/volumes/ntfy/{cache,etc,attachments} # 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_BASE_URL=http://192.168.10.61:5480 - 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 - ${Volumes_Path}/attachments:/var/lib/ntfy/attachments