SaaS/docker-compose.yml
Claude Code bfbb2c7fa5 Initial commit: Click Counter SaaS Application
- Express.js server with static file serving
- Click counter frontend with localStorage persistence
- Optimized Docker setup with multi-stage build
- Production-ready configuration with health checks
- Automated deployment script for VPS
- Comprehensive deployment documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 10:25:12 +01:00

42 lines
No EOL
1 KiB
YAML

version: '3.8'
services:
click-counter:
build:
context: .
dockerfile: Dockerfile
image: click-counter-app:latest
container_name: click-counter
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Ограничения ресурсов для экономии на VPS
deploy:
resources:
limits:
memory: 128M
cpus: '0.5'
reservations:
memory: 64M
cpus: '0.25'
# Логирование
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Безопасность
security_opt:
- no-new-privileges:true
read_only: false
tmpfs:
- /tmp