Restore videoreg public guide site with static isolated deployment
Production container deploy / production (push) Failing after 2m34s
Production container deploy / production (push) Failing after 2m34s
This commit is contained in:
1 parent
2ce58fcbc0
commit
53e4f06486
35 files changed
+599
-355
No files matched your search
@@ -1,37 +1,14 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM node:22-alpine AS deps
|
||||
# Legacy dynamic application image; public production uses root Dockerfile (static).
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY .npmrc package.json package-lock.json ./
|
||||
RUN npm install -g npm@11.6.4 \
|
||||
&& npm ci --prefer-offline --no-audit --no-fund
|
||||
|
||||
FROM deps AS build
|
||||
WORKDIR /app
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
COPY package.json package-lock.json .npmrc ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
COPY tsconfig.json vitest.config.ts ./
|
||||
COPY web-front web-front
|
||||
COPY ingestion ingestion
|
||||
RUN npm run ci:quality
|
||||
|
||||
FROM node:22-alpine AS runtime
|
||||
ENV NODE_ENV=production \
|
||||
APP_ENV=production \
|
||||
NEXT_TELEMETRY_DISABLED=1 \
|
||||
VIDEOREG_DB_FILE=/data/videoreg.json \
|
||||
PORT=3000
|
||||
WORKDIR /app
|
||||
|
||||
RUN addgroup -S nodeapp && adduser -S nodeapp -G nodeapp && mkdir -p /data && chown nodeapp:nodeapp /data
|
||||
|
||||
COPY --from=build /app/web-front/.next/standalone ./
|
||||
COPY --from=build /app/web-front/.next/static ./.next/static
|
||||
COPY --from=build /app/web-front/public ./public
|
||||
|
||||
USER nodeapp
|
||||
EXPOSE 3000
|
||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=20s --retries=3 \
|
||||
CMD wget -qO- http://127.0.0.1:3000/health/ready >/dev/null || exit 1
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
RUN npm run build
|
||||
FROM nginx:1.28-alpine
|
||||
COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/web-front/out/ /usr/share/nginx/html/
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://127.0.0.1:8080/health/ready >/dev/null || exit 1
|
||||
Reference in new issue
Block a user