Some checks are pending
Deploy to Production / deploy (push) Waiting to run
- Added .dockerignore to exclude unnecessary files from Docker builds - Enhanced .env.example with detailed configuration options and added MySQL settings - Created Gitea CI/CD workflow for automated production deployment with health checks - Added comprehensive Caddy server setup guide and configuration for reverse proxy - Created Caddyfile with secure defaults for SSL, compression, and security headers The changes focus on setting up a production-
68 lines
1.4 KiB
Caddyfile
68 lines
1.4 KiB
Caddyfile
# Caddy configuration for VoxBlog
|
|
# Add this to your existing Caddyfile on VPS
|
|
|
|
# Option 1: Single domain with /api path (Recommended)
|
|
voxblog.yourdomain.com {
|
|
# Frontend (React Admin)
|
|
handle / {
|
|
reverse_proxy localhost:3000
|
|
}
|
|
|
|
# API Backend
|
|
handle /api* {
|
|
reverse_proxy localhost:3001
|
|
}
|
|
|
|
# Enable gzip compression
|
|
encode gzip
|
|
|
|
# Security headers
|
|
header {
|
|
X-Frame-Options "SAMEORIGIN"
|
|
X-Content-Type-Options "nosniff"
|
|
X-XSS-Protection "1; mode=block"
|
|
Referrer-Policy "strict-origin-when-cross-origin"
|
|
}
|
|
|
|
# Logging
|
|
log {
|
|
output file /var/log/caddy/voxblog-access.log
|
|
}
|
|
}
|
|
|
|
# Option 2: Separate subdomains (Alternative)
|
|
# Uncomment if you prefer separate subdomains
|
|
|
|
# Frontend subdomain
|
|
# voxblog.yourdomain.com {
|
|
# reverse_proxy localhost:3000
|
|
#
|
|
# encode gzip
|
|
#
|
|
# header {
|
|
# X-Frame-Options "SAMEORIGIN"
|
|
# X-Content-Type-Options "nosniff"
|
|
# X-XSS-Protection "1; mode=block"
|
|
# }
|
|
#
|
|
# log {
|
|
# output file /var/log/caddy/voxblog-access.log
|
|
# }
|
|
# }
|
|
|
|
# API subdomain
|
|
# api.voxblog.yourdomain.com {
|
|
# reverse_proxy localhost:3001
|
|
#
|
|
# encode gzip
|
|
#
|
|
# header {
|
|
# X-Frame-Options "SAMEORIGIN"
|
|
# X-Content-Type-Options "nosniff"
|
|
# }
|
|
#
|
|
# log {
|
|
# output file /var/log/caddy/voxblog-api-access.log
|
|
# }
|
|
# }
|