Features: - Multi-stage Dockerfile for optimized production builds - Docker Compose configuration with health checks - Health check endpoint for container monitoring - Production environment configuration template - Comprehensive deployment guide for Mac Mini - Docker ignore file for efficient build context - Security: Non-root user, proper signal handling - Persistence: Data directory volume mounting - Performance: Alpine Linux base, optimized layers - Future-ready: MongoDB service configuration (commented) Deployment: - Simple 'docker-compose up' deployment - Automatic health monitoring and restart policies - Persistent data storage with volume mounts - Port configuration and environment customization - Complete troubleshooting and management guide
51 lines
No EOL
1.1 KiB
YAML
51 lines
No EOL
1.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Etsy Finance Tracker Application
|
|
etsy-tracker:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: etsy-finance-tracker
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=3000
|
|
volumes:
|
|
# Mount data directory for persistent storage
|
|
- ./data:/app/data
|
|
# Optional: Mount uploads directory if needed
|
|
- etsy_uploads:/app/uploads
|
|
restart: unless-stopped
|
|
networks:
|
|
- etsy-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Optional: MongoDB for future database needs
|
|
# mongodb:
|
|
# image: mongo:6.0
|
|
# container_name: etsy-mongo
|
|
# ports:
|
|
# - "27017:27017"
|
|
# environment:
|
|
# MONGO_INITDB_ROOT_USERNAME: admin
|
|
# MONGO_INITDB_ROOT_PASSWORD: changeme
|
|
# volumes:
|
|
# - etsy_mongodb_data:/data/db
|
|
# networks:
|
|
# - etsy-network
|
|
# restart: unless-stopped
|
|
|
|
volumes:
|
|
etsy_uploads:
|
|
# etsy_mongodb_data:
|
|
|
|
networks:
|
|
etsy-network:
|
|
driver: bridge |