fix: serve dist at nginx root, remove /lnbox/ redirect in container
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Upstream proxy strips /lnbox/ prefix via proxy_pass, so container nginx receives requests at /. Old config caused infinite redirect loop.
This commit is contained in:
@@ -19,13 +19,10 @@ COPY --from=0 /usr/src/app/dist /usr/share/nginx/html/lnbox
|
|||||||
RUN echo "server {\
|
RUN echo "server {\
|
||||||
listen 80;\
|
listen 80;\
|
||||||
server_name localhost;\
|
server_name localhost;\
|
||||||
|
root /usr/share/nginx/html/lnbox;\
|
||||||
|
index index.html;\
|
||||||
location / {\
|
location / {\
|
||||||
return 301 /lnbox/;\
|
try_files \$uri \$uri/ /index.html;\
|
||||||
}\
|
|
||||||
location /lnbox {\
|
|
||||||
alias /usr/share/nginx/html/lnbox;\
|
|
||||||
index index.html index.htm;\
|
|
||||||
try_files \$uri \$uri/ /lnbox/index.html;\
|
|
||||||
}\
|
}\
|
||||||
}" > /etc/nginx/conf.d/default.conf
|
}" > /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ services:
|
|||||||
lnbox:
|
lnbox:
|
||||||
image: harbor.lnh2e.com/lingniu-v1/lnbox:main-0.0.0
|
image: harbor.lnh2e.com/lingniu-v1/lnbox:main-0.0.0
|
||||||
ports:
|
ports:
|
||||||
- "8029:80"
|
- "8030:80"
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
|
|||||||
Reference in New Issue
Block a user