41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
# Production Docker Compose configuration
|
|
# This configuration is optimized for production environments
|
|
# and addresses common SQLite issues in containerized deployments
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
server:
|
|
container_name: tingz-server
|
|
env_file: .env
|
|
build:
|
|
context: .
|
|
args:
|
|
UID: ${UID}
|
|
GID: ${GID}
|
|
environment:
|
|
# Database configuration for production
|
|
DB_JOURNAL_MODE: "DELETE" # Use DELETE mode instead of WAL for better volume mount compatibility
|
|
DB_SYNCHRONOUS: "FULL" # Full synchronous mode for data integrity
|
|
DB_BUSY_TIMEOUT: "30000" # 30 second timeout for busy database
|
|
|
|
# Optional: Override other settings for production
|
|
# LOG_LEVEL: "warn" # Reduce log verbosity in production
|
|
# MAX_UPLOAD_SIZE: "52428800" # 50MB limit for production
|
|
volumes:
|
|
- ./data:/data
|
|
- ./docs:/var/www/docs
|
|
- ./deploys:/var/www/deploys
|
|
ports:
|
|
- "${HOST}:${PORT}:8080"
|
|
user: "${UID}:${GID}"
|
|
restart: unless-stopped
|
|
|
|
# Health check to ensure service is running
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/api/v1/status"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|