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:
2025-09-30 14:23:14 +02:00
parent 13dacee924
commit d1f312116e
6 changed files with 253 additions and 5 deletions

18
docker-compose.yml Normal file
View 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