Add volume definitions and healthcheck to docker-compose.yml for improved service management
This commit is contained in:
@ -10,9 +10,18 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- scriptshare_data:/usr/share/nginx/html
|
||||||
|
- scriptshare_logs:/var/log/nginx
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
scriptshare_data:
|
||||||
|
driver: local
|
||||||
|
scriptshare_logs:
|
||||||
|
driver: local
|
||||||
|
Reference in New Issue
Block a user