this should do it
This commit is contained in:
40
docker-compose.prod.yml
Normal file
40
docker-compose.prod.yml
Normal 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
|
||||
Reference in New Issue
Block a user