Update Docker Compose configuration to use host network mode for services

- Changed network configuration for frontend, backend, database, and cache services to use host network mode.
- Removed port mappings to enhance service communication and simplify network management.
This commit is contained in:
T. Narantuya 2025-08-29 18:41:35 +09:00
parent c625b978d9
commit fd4bef3ffe

View File

@ -6,8 +6,7 @@ services:
frontend:
image: portal-frontend:latest
container_name: portal-frontend
ports:
- "127.0.0.1:3000:3000"
network_mode: host
environment:
- NODE_ENV=production
- PORT=3000
@ -26,11 +25,7 @@ services:
backend:
image: portal-backend:latest
container_name: portal-backend
ports:
- "127.0.0.1:4000:4000"
links:
- database
- cache
network_mode: host
environment:
- NODE_ENV=production
- PORT=4000
@ -79,6 +74,7 @@ services:
database:
image: postgres:17-alpine
container_name: portal-database
network_mode: host
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
@ -96,6 +92,7 @@ services:
cache:
image: redis:7-alpine
container_name: portal-cache
network_mode: host
volumes:
- redis_data:/data
restart: unless-stopped