K30 / docker-compose.yml
Raí Santos
oi
65f788b
version: '3.8'
services:
fitness-app:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: fitness-app
ports:
- "7860:7860"
environment:
- NODE_ENV=production
- PORT=7860
restart: unless-stopped
# Volume for persistent data (optional - if you want to persist user data)
# volumes:
# - ./data:/app/data
# Resource limits (adjust based on your needs)
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
# Health check
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:7860/', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"