Files
frontend/Dockerfile
T
ksv741 1aafef0069
Frontend verify / commits (pull_request) Successful in 49s
Frontend verify / security (pull_request) Failing after 22s
Frontend verify / verify (pull_request) Skipped
Frontend verify / commits (pull_request) Successful in 50s
chore: bump Node to 24.22.1 (WealthLedger/backend#122)
Fixes the better-sqlite3 GC abort (nodejs/node#63985) in Node 24.19.0-24.21.x.
Keeps all repositories on the same Node version.
2026-10-23 07:31:59 +03:00

35 lines
1.0 KiB
Docker

FROM node:24.22.1-bookworm-slim AS dependencies
WORKDIR /app
ENV HUSKY=0
COPY package.json package-lock.json ./
COPY packages/tokens/package.json ./packages/tokens/
COPY packages/ui/package.json ./packages/ui/
COPY packages/icons/package.json ./packages/icons/
RUN npm ci
FROM dependencies AS development
COPY . .
RUN npm run build:packages
ENV VITE_API_BASE_URL="" API_PROXY_TARGET=http://backend:3000
EXPOSE 8080
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "8080", "--strictPort"]
FROM dependencies AS build
COPY . .
ENV VITE_API_BASE_URL=""
RUN npm run build
FROM nginx:1.28.0-alpine AS production
ARG VERSION
ARG REVISION
LABEL org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$REVISION
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/dist /usr/share/nginx/html
USER nginx
EXPOSE 8080
ENTRYPOINT ["nginx"]
CMD ["-g", "daemon off;"]
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=6 \
CMD wget -q -O /dev/null http://127.0.0.1:8080/ || exit 1