Restrict data service ports to localhost

This commit is contained in:
2026-06-10 10:49:58 +08:00
parent e589073311
commit 9e05b09a38
3 changed files with 13 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-kg_admin}
ports:
- "${POSTGRES_PORT:-5433}:5432"
- "${POSTGRES_HOST_BIND:-127.0.0.1}:${POSTGRES_PORT:-5433}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./snapshots/postgres/kg_admin_new2.dump:/snapshots/kg_admin_new2.dump:ro
@@ -42,8 +42,8 @@ services:
container_name: travel-kg-falkordb
restart: unless-stopped
ports:
- "${FALKORDB_PORT:-6380}:6379"
- "${FALKORDB_BROWSER_PORT:-3002}:3000"
- "${FALKORDB_HOST_BIND:-127.0.0.1}:${FALKORDB_PORT:-6380}:6379"
- "${FALKORDB_BROWSER_HOST_BIND:-127.0.0.1}:${FALKORDB_BROWSER_PORT:-3002}:3000"
volumes:
- falkordb-data:/var/lib/falkordb/data
depends_on:
@@ -90,7 +90,7 @@ services:
AMAP_SECURITY_JSCODE: ${AMAP_SECURITY_JSCODE:-}
GAODE_CRAWLER_PATH: ${GAODE_CRAWLER_PATH:-}
ports:
- "${API_PORT:-8102}:8000"
- "${API_HOST_BIND:-0.0.0.0}:${API_PORT:-8102}:8000"
depends_on:
postgres:
condition: service_healthy