48 lines
1.9 KiB
YAML
48 lines
1.9 KiB
YAML
# Tom's production stack on Unraid -- a personal deployment, not needed to run
|
|
# Flypaper elsewhere (see the README for a generic setup). Deployed as is by
|
|
# .gitea/workflows/deploy.yml, not pasted into the Compose Manager.
|
|
#
|
|
# NPM reaches the trap as flypaper:8080 over the external network proxynet (default
|
|
# site for unknown hosts). The dashboard has its own
|
|
# port 8081, published only to the LAN: http://192.168.1.14:44307.
|
|
#
|
|
# `restart: always`, not `unless-stopped`: Unraid stops every container explicitly
|
|
# when Docker or the array goes down, and `unless-stopped` treats that as a manual
|
|
# stop -- the trap would stay down after a reboot.
|
|
|
|
name: flypaper
|
|
|
|
services:
|
|
flypaper:
|
|
# :main follows every push to main; releases are tagged :X.Y.Z and :latest.
|
|
image: gitea.anticarnist.de/tom/flypaper:main
|
|
container_name: flypaper
|
|
restart: always
|
|
ports:
|
|
- "44307:8081"
|
|
environment:
|
|
TZ: Europe/Berlin
|
|
# Subnet of proxynet: only NPM may set X-Forwarded-For / X-Real-IP.
|
|
Flypaper__Http__TrustedProxies__0: 172.19.0.0/16
|
|
# From the repository secret, never in the repo.
|
|
Flypaper__Admin__Password: ${FLYPAPER_ADMIN_PASSWORD:?FLYPAPER_ADMIN_PASSWORD is not set}
|
|
volumes:
|
|
# SQLite database and Data Protection keys. Owned by the image's app user
|
|
# (UID 1654); the deploy workflow creates the folder and sets the owner.
|
|
- /mnt/user/appdata/flypaper:/data
|
|
networks:
|
|
- proxynet
|
|
healthcheck:
|
|
# The image has neither curl nor wget; bash's /dev/tcp does the request
|
|
# against the dashboard port.
|
|
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/8081 && printf 'GET /health HTTP/1.0\\r\\nHost: localhost\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
start_period: 10s
|
|
retries: 3
|
|
|
|
networks:
|
|
proxynet:
|
|
# Created once on Unraid and shared with NPM.
|
|
external: true
|