Files
lnbox/Dockerfile
kkfluous 8ca8e7a61c
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: serve dist at nginx root, remove /lnbox/ redirect in container
Upstream proxy strips /lnbox/ prefix via proxy_pass, so container nginx
receives requests at /. Old config caused infinite redirect loop.
2026-06-05 16:43:33 +08:00

30 lines
504 B
Docker

FROM node:22-alpine as builder
ENV CI=true
WORKDIR /usr/src/app
COPY . .
RUN npm install pnpm@9 -g && rm -f pnpm-lock.yaml
RUN pnpm install --no-frozen-lockfile
RUN pnpm build
FROM nginx:1.26
COPY --from=0 /usr/src/app/dist /usr/share/nginx/html/lnbox
RUN echo "server {\
listen 80;\
server_name localhost;\
root /usr/share/nginx/html/lnbox;\
index index.html;\
location / {\
try_files \$uri \$uri/ /index.html;\
}\
}" > /etc/nginx/conf.d/default.conf
EXPOSE 80