Update nginx config and add Caddy2 support
- Fixed nginx.conf to proxy all API routes (/patches, /generate, /health, /docs) - Changed frontend port to 3080 in docker-compose.yml - Added Caddyfile for Caddy2 reverse proxy configuration - Supports both FQDN and IP:port configurations
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Caddy 2 Configuration for AI Photo Edit
|
||||
|
||||
# Replace with your actual domain
|
||||
ai-photo-edit.yourdomain.com {
|
||||
# Frontend - serves the React app
|
||||
reverse_proxy localhost:3080
|
||||
|
||||
# API routes - proxy to backend
|
||||
handle /projects* {
|
||||
reverse_proxy localhost:8000
|
||||
}
|
||||
|
||||
handle /edits* {
|
||||
reverse_proxy localhost:8000
|
||||
}
|
||||
|
||||
handle /patches* {
|
||||
reverse_proxy localhost:8000
|
||||
}
|
||||
|
||||
handle /generate* {
|
||||
reverse_proxy localhost:8000
|
||||
}
|
||||
|
||||
handle /health {
|
||||
reverse_proxy localhost:8000
|
||||
}
|
||||
|
||||
handle /docs {
|
||||
reverse_proxy localhost:8000
|
||||
}
|
||||
|
||||
handle /openapi.json {
|
||||
reverse_proxy localhost:8000
|
||||
}
|
||||
}
|
||||
|
||||
# Alternative: Use IP:Port format (no domain)
|
||||
# :8080 {
|
||||
# reverse_proxy localhost:3080
|
||||
#
|
||||
# handle /projects* {
|
||||
# reverse_proxy localhost:8000
|
||||
# }
|
||||
# handle /edits* {
|
||||
# reverse_proxy localhost:8000
|
||||
# }
|
||||
# handle /patches* {
|
||||
# reverse_proxy localhost:8000
|
||||
# }
|
||||
# handle /generate* {
|
||||
# reverse_proxy localhost:8000
|
||||
# }
|
||||
# }
|
||||
Reference in New Issue
Block a user