mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
rust backend + migration
This commit is contained in:
1 parent
0bdd7cedb0
commit
61f0aadc70
70 files changed
+13707
-37
No files matched your search
+4
-37
@@ -31,43 +31,10 @@ COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Custom Nginx config to handle React Router (SPA) and proxy API requests
|
||||
RUN printf 'server {\n\
|
||||
listen 80;\n\
|
||||
location / {\n\
|
||||
root /usr/share/nginx/html;\n\
|
||||
index index.html index.htm;\n\
|
||||
try_files $uri $uri/ /index.html;\n\
|
||||
}\n\
|
||||
location /api/ {\n\
|
||||
proxy_pass http://holy-backend:8000/api/;\n\
|
||||
proxy_set_header Host $host;\n\
|
||||
proxy_set_header X-Real-IP $remote_addr;\n\
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\
|
||||
proxy_set_header X-Forwarded-Proto $scheme;\n\
|
||||
}\n\
|
||||
location /admin/ {\n\
|
||||
proxy_pass http://holy-backend:8000/admin/;\n\
|
||||
proxy_set_header Host $host;\n\
|
||||
proxy_set_header X-Real-IP $remote_addr;\n\
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\
|
||||
proxy_set_header X-Forwarded-Proto $scheme;\n\
|
||||
}\n\
|
||||
location /static/ {\n\
|
||||
proxy_pass http://holy-backend:8000/static/;\n\
|
||||
proxy_set_header Host $host;\n\
|
||||
proxy_set_header X-Real-IP $remote_addr;\n\
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\
|
||||
proxy_set_header X-Forwarded-Proto $scheme;\n\
|
||||
}\n\
|
||||
location /media/ {\n\
|
||||
proxy_pass http://holy-backend:8000/media/;\n\
|
||||
proxy_set_header Host $host;\n\
|
||||
proxy_set_header X-Real-IP $remote_addr;\n\
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\
|
||||
proxy_set_header X-Forwarded-Proto $scheme;\n\
|
||||
}\n\
|
||||
}' > /etc/nginx/conf.d/default.conf
|
||||
# Nginx config: SPA + strangler API routing (Django/Rust per-group). See
|
||||
# nginx.conf for the cutover layout. proxy_params.conf holds shared headers.
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY proxy_params.conf /etc/nginx/proxy_params.conf
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in new issue
Block a user