- Dockerfile with Node.js 18 Alpine base image - Multi-stage build with production dependencies only - Non-root user for security - Health checks and proper signal handling - Volume mounting for persistent database storage - Docker Compose configuration for easy deployment - Environment variable support for production config - Updated README with comprehensive container instructions Container features: - Persistent data storage in /app/data volume - Production-ready configuration - Security hardened with non-root user - Health monitoring built-in 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
555 B
YAML
23 lines
555 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
etf-tracker:
|
|
build: .
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- etf_data:/app/data
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=3000
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "const http = require('http'); http.get('http://localhost:3000/', (res) => { process.exit(res.statusCode === 200 ? 0 : 1); }).on('error', () => { process.exit(1); });"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
etf_data:
|
|
driver: local |