fix(deploy): explicit backend network for steward↔db traffic
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -16,6 +16,8 @@ services:
|
|||||||
pull_policy: always
|
pull_policy: always
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
volumes:
|
volumes:
|
||||||
# /data holds the auto-generated secret key, third-party plugins, and the
|
# /data holds the auto-generated secret key, third-party plugins, and the
|
||||||
# Ansible playbook cache — all of which must survive image updates. No
|
# Ansible playbook cache — all of which must survive image updates. No
|
||||||
@@ -33,13 +35,15 @@ services:
|
|||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:16-alpine
|
image: postgres:16-alpine
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: steward
|
POSTGRES_USER: steward
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-steward}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-steward}
|
||||||
POSTGRES_DB: steward
|
POSTGRES_DB: steward
|
||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
# No host port published — Postgres is reachable only on the compose network.
|
# No host port published — db is reachable only on the backend network.
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U steward"]
|
test: ["CMD-SHELL", "pg_isready -U steward"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
@@ -47,6 +51,9 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
networks:
|
||||||
|
backend:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
app_data:
|
app_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user