Merge pull request #4 from outis1one/claude/ai-photo-edit-tool-c8orl
Update nginx config and add Caddy2 support
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
|
||||
# }
|
||||
# }
|
||||
+1
-1
@@ -28,7 +28,7 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
container_name: ai-photo-edit-frontend
|
||||
ports:
|
||||
- "80:80"
|
||||
- "3080:80" # Frontend on port 3080
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
|
||||
+31
-1
@@ -16,7 +16,7 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# API proxy
|
||||
# API proxy - proxy all API routes to backend
|
||||
location /projects {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_http_version 1.1;
|
||||
@@ -35,6 +35,36 @@ server {
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
location /patches {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
location /generate {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
location /health {
|
||||
proxy_pass http://backend:8000;
|
||||
}
|
||||
|
||||
location /docs {
|
||||
proxy_pass http://backend:8000;
|
||||
}
|
||||
|
||||
location /openapi.json {
|
||||
proxy_pass http://backend:8000;
|
||||
}
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
|
||||
Reference in New Issue
Block a user