Réseaux explicites : app et Postgres partagent un réseau interne dédié

Corrige ECONNREFUSED vers postgres:5432 apparu après l'ajout du réseau proxy.
Postgres et l'app sont désormais tous deux sur un réseau "internal" dédié
(résolution fiable de l'hôte "postgres"), l'app étant en plus sur le réseau
externe "proxy" pour le reverse proxy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XwfhYHzC9hQWPDnQ2p53GL
This commit is contained in:
Claude committed 2026-06-26 16:58:41 +00:00
1 parent 785f7169cc
commit 41d2cd785e
1 file changed
+7 -3
+7 -3
View File
@@ -23,6 +23,8 @@ services:
interval: 5s
timeout: 5s
retries: 12
networks:
- internal
app:
build: .
@@ -48,10 +50,10 @@ services:
# Persists the auto-generated AUTH_SECRET across restarts.
- appdata:/app/data
networks:
# "default" lets the app reach Postgres; "proxy" is the external network
# "internal" is shared with Postgres; "proxy" is the external network
# shared with the reverse proxy (e.g. Nginx Proxy Manager) so it can reach
# the app by name: forward to pleinr-app:3000
- default
- internal
- proxy
volumes:
@@ -59,7 +61,9 @@ volumes:
appdata:
networks:
default:
# Private network for app <-> Postgres communication.
internal:
driver: bridge
proxy:
# The reverse proxy's existing network. Must already exist (created by the
# NPM/nginx stack). Override the name with PROXY_NETWORK if it differs.