error with etherpad
This commit is contained in:
@@ -13,7 +13,7 @@ RUN npx ng build
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=build /app/dist/tlcfront /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY nginxFront.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@@ -1,16 +1,29 @@
|
||||
server {
|
||||
location /api/polls {
|
||||
proxy_pass http://back:8080;
|
||||
proxy_set_header Host $http_host;
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Proxy /api and all subpaths to backend service (back container on port 8080)
|
||||
location /api/ {
|
||||
proxy_pass http://back:8080/api/;
|
||||
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_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
}
|
||||
|
||||
# Also handle /api without trailing slash
|
||||
location = /api {
|
||||
proxy_pass http://back:8080/api;
|
||||
}
|
||||
|
||||
# SPA fallback for client-side routing
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html?$args;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
||||
Reference in New Issue
Block a user