feat: Add Docker support and health endpoint
- Add production-ready Dockerfile with multi-stage build - Add .dockerignore for optimized builds - Add docker-compose.yml for easy deployment - Add /health endpoint for container health checks - Update README with comprehensive Docker documentation - Include security best practices (non-root user, health checks) - Support for both development and production deployments
This commit is contained in:
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
stargirlnails:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:3000"
|
||||
env_file:
|
||||
- .env
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
environment:
|
||||
- NODE_ENV=production
|
Reference in New Issue
Block a user