docker: update web image build process and README
CI / changes (push) Successful in 8s
CI / openapi (push) Has been skipped
CI / go (push) Has been skipped
CI / docker-web (push) Failing after 16s
CI / docker-bird (push) Has been skipped
CI / bird2 (push) Successful in 22s
CI / docker-go (push) Failing after 51s

- Added a new target "web-build" to streamline the build process for web artifacts.
- Updated "evobgp-web" and "evobgp-web-all" targets to utilize the new "web-build" context.
- Modified Dockerfile to reflect changes in the build stages and context for web artifacts.
- Revised README to clarify the new build process and dependencies.
This commit is contained in:
Denozordec
2026-05-19 13:37:32 +07:00
parent 87309cfcec
commit 92f6de8695
3 changed files with 28 additions and 6 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1.7
# Статическая панель EvoBGP (SvelteKit) + nginx.
# Финальный stage `web` ожидает bake-контекст web-artifacts (= target:web-build).
FROM public.ecr.aws/docker/library/node:22-alpine AS deps
WORKDIR /web
COPY web/package.json web/package-lock.json ./
@@ -10,9 +11,9 @@ FROM deps AS build
COPY web/ ./
RUN npm run build
FROM public.ecr.aws/docker/library/nginx:1.27-alpine
FROM public.ecr.aws/docker/library/nginx:1.27-alpine AS web
ARG EVOBGP_UPSTREAM=evobgp-api
COPY deploy/docker/evobgp-web/nginx.conf /tmp/nginx-default.conf
RUN sed -e "s/evobgp-api/${EVOBGP_UPSTREAM}/g" /tmp/nginx-default.conf > /etc/nginx/conf.d/default.conf \
&& rm -f /tmp/nginx-default.conf
COPY --from=build /web/build /usr/share/nginx/html
COPY --from=web-artifacts /web/build /usr/share/nginx/html