trip-planner/docker-compose.prod.yml

66 lines
1.8 KiB
YAML
Raw Normal View History

2025-09-26 01:13:44 +02:00
version: '3.8'
services:
2025-11-16 15:53:52 +01:00
app:
2025-09-26 01:13:44 +02:00
build:
2025-11-16 15:53:52 +01:00
context: .
dockerfile: Dockerfile.prod
container_name: trip-planner-production
2025-09-26 01:13:44 +02:00
ports:
2025-11-16 15:53:52 +01:00
- "${APP_PORT:-8080}:80"
2025-09-26 01:13:44 +02:00
environment:
2025-11-16 15:53:52 +01:00
# Laravel Application
APP_NAME: "Trip Planner"
2025-09-26 01:13:44 +02:00
APP_ENV: production
APP_DEBUG: false
2025-11-16 15:53:52 +01:00
APP_KEY: ${APP_KEY}
APP_URL: ${APP_URL:-http://localhost:8080}
# Database (internal MariaDB)
2025-09-26 01:13:44 +02:00
DB_CONNECTION: mysql
2025-11-16 15:53:52 +01:00
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_DATABASE: ${DB_DATABASE:-trip_planner}
DB_USERNAME: ${DB_USERNAME:-trip_user}
DB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD must be set}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:?MYSQL_ROOT_PASSWORD must be set}
# Redis (internal)
REDIS_HOST: 127.0.0.1
2025-09-26 01:13:44 +02:00
REDIS_PORT: 6379
2025-11-16 15:53:52 +01:00
REDIS_PASSWORD: null
# Cache & Session
2025-09-26 01:13:44 +02:00
CACHE_DRIVER: redis
QUEUE_CONNECTION: redis
SESSION_DRIVER: redis
2025-11-16 15:53:52 +01:00
SESSION_LIFETIME: 120
2025-09-26 01:13:44 +02:00
2025-11-16 15:53:52 +01:00
# Mail (configure as needed)
MAIL_MAILER: ${MAIL_MAILER:-log}
MAIL_HOST: ${MAIL_HOST:-}
MAIL_PORT: ${MAIL_PORT:-}
MAIL_USERNAME: ${MAIL_USERNAME:-}
MAIL_PASSWORD: ${MAIL_PASSWORD:-}
MAIL_ENCRYPTION: ${MAIL_ENCRYPTION:-}
MAIL_FROM_ADDRESS: ${MAIL_FROM_ADDRESS:-noreply@tripplanner.local}
MAIL_FROM_NAME: "${MAIL_FROM_NAME:-Trip Planner}"
2025-09-26 01:13:44 +02:00
volumes:
2025-11-16 15:53:52 +01:00
# Persistent data for database
- db-data:/var/lib/mysql
# Persistent data for redis
- redis-data:/data/redis
# Persistent storage for uploaded files
- storage-data:/var/www/html/storage/app
2025-09-26 01:13:44 +02:00
restart: unless-stopped
2025-11-16 15:53:52 +01:00
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/up"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
2025-09-26 01:13:44 +02:00
volumes:
2025-11-16 15:53:52 +01:00
db-data:
redis-data:
storage-data: