添加VERSION构建参数强制每次重建dist层
This commit is contained in:
@@ -1,8 +1,13 @@
|
|||||||
# Frontend: Node.js static file server with API proxy
|
# Frontend: Node.js static file server with API proxy
|
||||||
FROM nfqlt/node20
|
FROM nfqlt/node20
|
||||||
|
|
||||||
|
ARG BUILD_TIME
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Use BUILD_TIME to invalidate cache so dist/ is always fresh
|
||||||
|
RUN echo "Build: $BUILD_TIME"
|
||||||
|
|
||||||
# Copy static files
|
# Copy static files
|
||||||
COPY dist/ /app/dist/
|
COPY dist/ /app/dist/
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.frontend
|
dockerfile: Dockerfile.frontend
|
||||||
|
args:
|
||||||
|
- VERSION=2
|
||||||
container_name: publish-frontend
|
container_name: publish-frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user