添加VERSION构建参数强制每次重建dist层
This commit is contained in:
@@ -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/
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.frontend
|
||||
args:
|
||||
- VERSION=2
|
||||
container_name: publish-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user