提交
This commit is contained in:
1 parent
09afdb1d65
commit
afd517ce10
215 files changed
+32936
-23862
No files matched your search
@@ -0,0 +1,28 @@
|
||||
# 基础镜像走 DaoCloud(避免 docker.1ms.run 等加速站缺 node/nginx manifest)
|
||||
ARG NODE_IMAGE=docker.m.daocloud.io/library/node:20-alpine
|
||||
ARG NGINX_IMAGE=docker.m.daocloud.io/library/nginx:1.27-alpine
|
||||
|
||||
FROM ${NODE_IMAGE} AS builder
|
||||
|
||||
ARG NPM_REGISTRY=https://registry.npmmirror.com
|
||||
|
||||
RUN corepack enable && corepack prepare pnpm@9.15.4 --activate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY web-admin/package.json web-admin/pnpm-lock.yaml ./
|
||||
RUN pnpm config set registry "${NPM_REGISTRY}" \
|
||||
&& pnpm install --frozen-lockfile
|
||||
|
||||
COPY web-admin/ .
|
||||
RUN pnpm exec vite build --mode docker
|
||||
|
||||
FROM ${NGINX_IMAGE}
|
||||
|
||||
COPY deploy/docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD wget -qO- http://127.0.0.1/ || exit 1
|
||||
Reference in new issue
Block a user