this should do it

This commit is contained in:
2025-10-14 22:35:11 +03:00
parent 54daf46d06
commit 356df3fc46
4 changed files with 103 additions and 6 deletions

40
docker-compose.prod.yml Normal file
View File

@@ -0,0 +1,40 @@
# 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