Update Docker Compose configuration for security and functionality
- Restrict frontend service port to localhost for enhanced security. - Add volume mapping for secrets to the application container. - Update healthcheck command for the database service to reflect new user and database names.
This commit is contained in:
parent
11f57dfd56
commit
8b855ca371
@ -8,7 +8,7 @@ services:
|
|||||||
container_name: portal-frontend
|
container_name: portal-frontend
|
||||||
network_mode: bridge
|
network_mode: bridge
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "127.0.0.1:3000:3000" # Only accessible from localhost for security
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- PORT=3000
|
- PORT=3000
|
||||||
@ -59,6 +59,8 @@ services:
|
|||||||
- EMAIL_TEMPLATE_RESET=${EMAIL_TEMPLATE_RESET}
|
- EMAIL_TEMPLATE_RESET=${EMAIL_TEMPLATE_RESET}
|
||||||
- EMAIL_TEMPLATE_WELCOME=${EMAIL_TEMPLATE_WELCOME}
|
- EMAIL_TEMPLATE_WELCOME=${EMAIL_TEMPLATE_WELCOME}
|
||||||
- NODE_OPTIONS=${NODE_OPTIONS}
|
- NODE_OPTIONS=${NODE_OPTIONS}
|
||||||
|
volumes:
|
||||||
|
- /var/www/vhosts/asolutions.jp/httpdocs/secrets:/app/secrets:ro
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
@ -86,7 +88,7 @@ services:
|
|||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U portal_user -d portal_db"]
|
test: ["CMD-SHELL", "pg_isready -U portal -d portal_prod"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user