fix: 统一前端Harbor镜像发布与拉取部署
This commit is contained in:
+3
-2
@@ -1,6 +1,6 @@
|
||||
# 与服务器 deploy.sh 对齐:
|
||||
# docker build --build-arg VERSION=$TAG -t sw2/frontend:$TAG .
|
||||
# docker run --rm --add-host sw2-backend:127.0.0.1 sw2/frontend:$TAG nginx -t
|
||||
# docker build --build-arg VERSION=$TAG -t harbor.fuhua91.com/game/sw2:$TAG .
|
||||
# docker push harbor.fuhua91.com/game/sw2:$TAG
|
||||
# 运行阶段与部署侧 frontend.Dockerfile 一致。本仓库在镜像内编译,
|
||||
# 产物对应部署侧的 COPY dist/。
|
||||
|
||||
@@ -19,5 +19,6 @@ ARG VERSION
|
||||
LABEL org.opencontainers.image.revision=$VERSION
|
||||
COPY nginx.sw2.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /src/dist /usr/share/nginx/html/
|
||||
RUN printf '%s\n' "$VERSION" > /usr/share/nginx/html/version.txt
|
||||
HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD wget -q -O /dev/null http://127.0.0.1/healthz || exit 1
|
||||
|
||||
Reference in New Issue
Block a user