Feat: Add marketing site and switch to git-based deployment

This commit is contained in:
poduck
2025-11-30 16:18:11 -05:00
parent 2b28fc49c9
commit 0d1a3045fb
6 changed files with 90 additions and 43 deletions

View File

@@ -45,7 +45,36 @@ http {
add_header Cache-Control "public, immutable";
}
# Handle SPA routing - serve index.html for all routes
# Proxy API requests to Django
location /api/ {
proxy_pass http://django:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Proxy Admin requests to Django
location /admin/ {
proxy_pass http://django:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Proxy Static/Media to Django (if served by WhiteNoise/Django)
location /static/ {
proxy_pass http://django:5000;
proxy_set_header Host $host;
}
location /media/ {
proxy_pass http://django:5000;
proxy_set_header Host $host;
}
# Handle SPA routing - serve index.html for all other routes
location / {
try_files $uri $uri/ /index.html;
}