1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

change docker

This commit is contained in:
MoonTestUse1
2024-12-23 23:44:46 +06:00
parent 876abdfc86
commit 866b0cbbf7
4 changed files with 18 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
# docker/nginx/conf.d/default.conf
upstream backend {
server backend:8000;
server backend:8000; # Changed port to match FastAPI default
}
server {
@@ -10,15 +10,15 @@ server {
root /usr/share/nginx/html;
index index.html;
# Handle SPA routing
# Handle frontend routes
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}
# Proxy API requests
# Proxy API requests to backend
location /api/ {
proxy_pass http://backend/api/;
proxy_pass http://backend/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';