Publish on host loopback for NPMplus with host networking

NPMplus runs with network_mode: host, so it cannot reach the container by
name on a shared Docker network. Publish the app on 127.0.0.1:4181 instead
and drop the NPM_NETWORK setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
uhlwoogiandClaude Opus 5.5 committed 2026-10-02 22:11:06 +00:00
1 parent 5b7b73225f
commit a51d5825ce
3 files changed
+14 -16

No files matched your search

+4 -8
View File
@@ -9,9 +9,10 @@ services:
restart: unless-stopped
# Reaps the headless Chromium processes the InDesign export starts.
init: true
# No published port: Nginx Proxy Manager reaches http://proposal-bot:4181 over its Docker network.
networks:
- proxy
# Published on the host's loopback only. NPMplus (host networking) forwards to http://127.0.0.1:4181;
# other machines cannot reach the port directly.
ports:
- "${PROPOSAL_BOT_BIND:-127.0.0.1}:${PROPOSAL_BOT_PORT:-4181}:4181"
environment:
HOST: 0.0.0.0
PORT: 4181
@@ -33,8 +34,3 @@ services:
source: ${PROPOSAL_BOT_PROJECT_IMAGES_HOST_PATH:?Set PROPOSAL_BOT_PROJECT_IMAGES_HOST_PATH to an absolute host folder for the photo library}
target: /app/Project Images
read_only: true
networks:
proxy:
external: true
name: ${NPM_NETWORK:?Set NPM_NETWORK to the Docker network Nginx Proxy Manager is attached to}