Files
daily_publish/Dockerfile.frontend
T

23 lines
508 B
Docker

# Frontend: Node.js static file server with API proxy
FROM nfqlt/node20 AS builder
ARG VERSION
# Copy dist to a versioned path — VERSION changes = different path = cache miss
COPY dist/ /tmp/dist-v${VERSION}/
FROM nfqlt/node20
WORKDIR /app
# Copy from the versioned path (never cached because path changes with VERSION)
COPY --from=builder /tmp/dist-v${VERSION}/ /app/dist/
COPY server.js /app/server.js
RUN mkdir -p /app/uploads && chmod 777 /app/uploads
EXPOSE 80
CMD ["node", "/app/server.js"]