diff --git a/.dockerignore b/.dockerignore index a480db3..1a16a95 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ node_modules -dist .vpn-proxy _archive .git diff --git a/.gitea/workflows/gateway-build.yml b/.gitea/workflows/gateway-build.yml index 998e912..7037c4f 100644 --- a/.gitea/workflows/gateway-build.yml +++ b/.gitea/workflows/gateway-build.yml @@ -23,6 +23,13 @@ jobs: cd repo git checkout ${{ gitea.sha }} + - name: Build frontend + run: | + set -euo pipefail + cd repo + npm ci --no-audit --no-fund + npm run build + - name: Build and push gateway image run: | set -euo pipefail diff --git a/Dockerfile b/Dockerfile index ba608a0..382fd97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,6 @@ -FROM node:22-bookworm-slim AS ui-build -WORKDIR /app -COPY package.json package-lock.json ./ -RUN --mount=type=cache,target=/root/.npm \ - npm ci --no-audit --no-fund --network-timeout=300000 -COPY index.html vite.config.js ./ -COPY src/web ./src/web -RUN npm run build - FROM debian:bookworm-slim ARG SINGBOX_VERSION=1.12.13 -COPY --from=ui-build /app/dist /app/dist +COPY dist /app/dist RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl iptables iproute2 nodejs dumb-init \