- Add separated Docker Compose architecture (astro/infrastructure/override) - Implement Directus + PostgreSQL with pinned versions (10.12.0/15.5-alpine) - Add comprehensive database safety protections and backup scripts - Configure production-ready NGINX reverse proxy setup - Add container names, labels, and enhanced healthchecks - Remove fallback environment variables for explicit production config - Include log rotation and monitoring improvements Infrastructure deployment: - npm run docker:infrastructure:up (one-time setup) - npm run docker:astro:up (regular deployments) - npm run db:backup/restore/status (database management) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
45 lines
1001 B
Plaintext
45 lines
1001 B
Plaintext
# Log rotation configuration for Black Canyon Tickets
|
|
# Copy this file to /etc/logrotate.d/bct on your server
|
|
|
|
/var/www/bct-whitelabel/logs/*.log {
|
|
# Rotate daily
|
|
daily
|
|
|
|
# Keep 7 days of logs
|
|
rotate 7
|
|
|
|
# Compress old logs (saves disk space)
|
|
compress
|
|
|
|
# Don't compress the most recent rotated file
|
|
delaycompress
|
|
|
|
# Don't error if log file is missing
|
|
missingok
|
|
|
|
# Don't rotate empty files
|
|
notifempty
|
|
|
|
# Create new log file with specific permissions
|
|
create 644 tyler tyler
|
|
|
|
# Use date as suffix for rotated files
|
|
dateext
|
|
|
|
# Run commands after rotation
|
|
postrotate
|
|
# Send SIGUSR1 to Docker containers to reopen log files (if needed)
|
|
# docker kill --signal=USR1 bct-astro 2>/dev/null || true
|
|
endscript
|
|
}
|
|
|
|
# Docker container logs (optional)
|
|
/var/lib/docker/containers/*/*-json.log {
|
|
daily
|
|
rotate 7
|
|
compress
|
|
delaycompress
|
|
missingok
|
|
notifempty
|
|
copytruncate
|
|
} |