add network configs

This commit is contained in:
2026-03-10 11:08:02 +08:00
parent 245be63f07
commit d5303ad201

View File

@@ -5,6 +5,8 @@ services:
postgres: postgres:
image: postgres:16-alpine image: postgres:16-alpine
container_name: langchain-agent-db container_name: langchain-agent-db
networks:
- app-network
environment: environment:
POSTGRES_DB: postgres POSTGRES_DB: postgres
POSTGRES_USER: postgres POSTGRES_USER: postgres
@@ -15,7 +17,7 @@ services:
APP_DB_PASSWORD: ${POSTGRES_PASSWORD:-secure_password_123} APP_DB_PASSWORD: ${POSTGRES_PASSWORD:-secure_password_123}
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
- ./scripts/init_database:/docker-entrypoint-initdb.d - ../scripts/init_database:/docker-entrypoint-initdb.d
ports: ports:
- "${POSTGRES_PORT:-5432}:5432" - "${POSTGRES_PORT:-5432}:5432"
healthcheck: healthcheck:
@@ -45,6 +47,8 @@ services:
- ../scripts:/app/scripts - ../scripts:/app/scripts
- ../assets:/app/assets - ../assets:/app/assets
- ../static:/app/static - ../static:/app/static
networks:
- app-network
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
@@ -60,6 +64,8 @@ services:
nginx: nginx:
image: nginx:alpine image: nginx:alpine
container_name: langchain-agent-nginx container_name: langchain-agent-nginx
networks:
- app-network
ports: ports:
- "${FRONTEND_PORT:-80}:80" - "${FRONTEND_PORT:-80}:80"
volumes: volumes:
@@ -72,3 +78,7 @@ services:
volumes: volumes:
postgres_data: postgres_data:
networks:
app-network:
driver: bridge