app/.docker/production/docker-compose.test.yml

105 lines
3.3 KiB
YAML

# ============================================
# Dish Planner - Self-Hosted Deployment
# ============================================
#
# QUICK START:
# 1. Copy this file to your server
# 2. (Optional) Edit the environment variables below
# 3. Run: docker compose up -d
# 4. Access your app at http://localhost:3000
#
# IMPORTANT SECURITY NOTES:
# - Database credentials are auto-generated on first run
# - Check the container logs to see generated credentials:
# docker logs dishplanner
# - For production, set a custom APP_URL environment variable
#
# CUSTOMIZATION:
# You can override any environment variable by uncommenting
# and editing the values below, or by creating a .env file.
#
# ============================================
services:
dishplanner:
# Pre-built all-in-one image from Docker Hub
image: localhost/dishplanner-allinone:test
container_name: dishplanner
restart: unless-stopped
# ----------------------------------------
# Port Configuration
# ----------------------------------------
# The application will be accessible on port 3000
# Change the left number to use a different host port
# Example: "8080:80" to access on port 8080
ports:
- "3000:80"
# ----------------------------------------
# Environment Variables
# ----------------------------------------
# Uncomment and customize as needed
environment:
# Application URL (set this to your domain)
- APP_URL=http://localhost:3000
# Application environment (production recommended)
- APP_ENV=production
# Debug mode (set to false in production for security)
- APP_DEBUG=false
# Database configuration
# Note: Credentials are auto-generated on first run if not set
# Check logs for generated credentials: docker logs dishplanner
# - DB_DATABASE=dishplanner
# - DB_USERNAME=dishuser
# - DB_PASSWORD=change-this-secure-password
# Timezone (optional)
# - APP_TIMEZONE=UTC
# ----------------------------------------
# Persistent Data Volumes
# ----------------------------------------
# These volumes ensure data persists across container restarts
volumes:
# MySQL database data
- dishplanner_mysql_data:/var/lib/mysql
# Laravel storage (uploaded files, logs, cache)
- dishplanner_storage:/var/www/backend/storage
# Supervisor logs
- dishplanner_logs:/var/log/supervisor
# ----------------------------------------
# Health Check (optional)
# ----------------------------------------
# Uncomment to enable container health monitoring
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost/api/health"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 60s
# ----------------------------------------
# Named Volumes
# ----------------------------------------
# Docker manages these volumes - data persists even if container is removed
volumes:
dishplanner_mysql_data:
driver: local
dishplanner_storage:
driver: local
dishplanner_logs:
driver: local
# ----------------------------------------
# Network Configuration
# ----------------------------------------
# Uses default bridge network (suitable for single-host deployment)
# For advanced setups, you can define custom networks here