nginx-proxy-manager: env-configurable ports/restart, section order; network exception

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
code
2026-11-15 17:37:56 +00:00
co-authored by Claude Opus 5.5
parent ce4078e05c
commit 80f2243424
5 changed files with 17 additions and 10 deletions
+1
View File
@@ -27,6 +27,7 @@ networks:
These deliberately violate the conventions above — do not "fix" them:
- `nginx-proxy-manager` creates the `proxy` network itself (`name: proxy`, `driver: bridge`) instead of declaring it external, since it's the first thing started on each host and is run via `docker run` rather than Dockhand
- `pihole` uses `network_mode: host` (it's a DNS server), so it has no `proxy` network
- `pangolin_dev` is itself an edge reverse proxy (Pangolin + gerbil + traefik), not a client of NPM; the `proxy` network is declared for convention but unused by its services, and `traefik` uses `network_mode: service:gerbil` instead of joining `internal`
- `zammad_dev` `zammad-init` service hardcodes `restart: on-failure` (init container)
+1 -1
View File
@@ -22,7 +22,7 @@ README_ORDER = ["Overview", "Project Details", "Getting Started",
UNIVERSAL_VARS = {"VOL_PATH", "VOL_PROJECTS", "TZ", "CONFIG_PATH", "LOG_PATH"}
# Known exceptions — see AGENTS.md "Known exceptions"
NO_PROXY_OK = {"pihole"}
NO_PROXY_OK = {"pihole", "nginx-proxy-manager"}
HARDCODED_RESTART_OK = {("zammad_dev", "on-failure")}
STALE_VARS_OK = {
"mailu_dev": None, # env_file: .env — all vars consumed in-container
+2
View File
@@ -29,6 +29,8 @@ These apply to the compose file (`sample.env`). The `docker run` command hardcod
VOL_PATH – base path for data and letsencrypt volumes (default /data)
LOG_PATH – where NPM logs are written (default /var/log/containers/nginx-proxy-manager)
PROXY_IMAGE – image and tag to run
PROXY_RESTART – restart policy (default unless-stopped)
PROXY_HTTP_PORT / PROXY_HTTPS_PORT / PROXY_ADMIN_PORT – host ports (default 80 / 443 / 81)
## Volume Notes
+9 -9
View File
@@ -1,22 +1,22 @@
services:
proxy:
image: ${PROXY_IMAGE:-jc21/nginx-proxy-manager:latest}
restart: unless-stopped
environment:
X_FRAME_OPTIONS: "sameorigin"
DB_SQLITE_FILE: "/data/database.sqlite"
ports:
- "80:80"
- "81:81"
- "443:443"
restart: ${PROXY_RESTART:-unless-stopped}
volumes:
- "${VOL_PATH:-/data}/nginx-proxy-manager/data:/data"
- "${VOL_PATH:-/data}/nginx-proxy-manager/letsencrypt:/etc/letsencrypt"
- "${LOG_PATH:-/var/log/containers/nginx-proxy-manager}:/data/logs"
environment:
X_FRAME_OPTIONS: "sameorigin"
DB_SQLITE_FILE: "/data/database.sqlite"
ports:
- "${PROXY_HTTP_PORT:-80}:80"
- "${PROXY_ADMIN_PORT:-81}:81"
- "${PROXY_HTTPS_PORT:-443}:443"
networks:
- proxy
networks:
proxy:
name: proxy
driver: bridge
driver: bridge
+4
View File
@@ -2,3 +2,7 @@
VOL_PATH=/data
LOG_PATH=/var/log/containers/nginx-proxy-manager
PROXY_IMAGE=jc21/nginx-proxy-manager:2.15.1
PROXY_RESTART=unless-stopped
PROXY_HTTP_PORT=80
PROXY_ADMIN_PORT=81
PROXY_HTTPS_PORT=443