添加VERSION构建参数强制每次重建dist层

This commit is contained in:
2026-05-24 23:38:07 +08:00
parent 06a457c1db
commit c9e619ff5e
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -1,8 +1,13 @@
# Frontend: Node.js static file server with API proxy
FROM nfqlt/node20
ARG BUILD_TIME
WORKDIR /app
# Use BUILD_TIME to invalidate cache so dist/ is always fresh
RUN echo "Build: $BUILD_TIME"
# Copy static files
COPY dist/ /app/dist/
+2
View File
@@ -22,6 +22,8 @@ services:
build:
context: .
dockerfile: Dockerfile.frontend
args:
- VERSION=2
container_name: publish-frontend
restart: unless-stopped
ports: