53f4df6e3c
- scripts/deploy.sh: Full deploy flow with fresh builds (--no-cache) - scripts/build-check.sh: Pre-flight staleness check - Docker labels for build tracking (git commit + timestamp) - Prevents stale container bug from recurring
24 lines
426 B
Docker
24 lines
426 B
Docker
FROM node:20-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM nginx:alpine
|
|
|
|
ARG GIT_COMMIT=unknown
|
|
ARG BUILD_DATE=unknown
|
|
LABEL org.opencontainers.image.revision=$GIT_COMMIT \
|
|
org.opencontainers.image.created=$BUILD_DATE
|
|
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|