docs: add troubleshooting guide and update environment examples

- Add TROUBLESHOOTING.md with comprehensive issue resolution guide
- Update .env.example with additional configuration options
- Include solutions for Mixed Content, CSP, and database issues
- Add network, performance, and upgrade troubleshooting sections

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 15:40:42 +08:00
parent 6126f74fb8
commit cbe76b1f96
2 changed files with 340 additions and 1 deletions

View File

@@ -8,12 +8,25 @@ CMD_DB_URL=postgres://codimd:CHANGE_THIS_TO_A_STRONG_PASSWORD@database/codimd
# CodiMD Domain Configuration
# For local development, use localhost
# For production, set your actual domain (e.g., hackmd.example.com)
# For production with HTTPS, set your actual domain (e.g., md.automodules.com)
CMD_DOMAIN=localhost
# URL Configuration
# Set CMD_PROTOCOL_USESSL=true when using HTTPS (with reverse proxy)
# Set CMD_URL_ADDPORT=false when using standard ports (80/443)
CMD_URL_ADDPORT=false
CMD_PROTOCOL_USESSL=false
# CodiMD Session Secret (generate a random string)
CMD_SESSION_SECRET=CHANGE_THIS_TO_A_RANDOM_SECRET_STRING
# Optional: Allow iframe embedding (if needed)
# CMD_ALLOW iframeorigin=https://example.com
# Optional: Session lifetime in milliseconds (default: 1209600000 = 14 days)
# CMD_SESSION_LIFETIME=1209600000
# Optional: Maximum upload size in bytes (default: 50MB)
# CMD_IMAGE_UPLOAD_TYPE=filesystem
# CMD_MAX_UPLOAD_SIZE=52428800