nxtgauge-frontend-solid/Dockerfile
Ashwin Kumar Sivakumar b130ce23b8
Some checks failed
build-and-release / build (push) Failing after 1m6s
fix: Update Dockerfile to use ci.nxtgauge.com registry
Changed from registry.nxtgauge.com to ci.nxtgauge.com/admin/
to fix SSL certificate issues and use Forgejo registry.
2026-07-08 03:37:18 +05:30

42 lines
1 KiB
Docker

# Multi-stage build with memory optimization
FROM ci.nxtgauge.com/admin/node:20-alpine AS builder
WORKDIR /app
# Skip browser downloads
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
ENV CYPRESS_INSTALL_BINARY=0
ENV NODE_ENV=production
# Set API URLs for build (create .env file)
RUN echo "VITE_API_URL=http://localhost:9100" > .env && \
echo "PUBLIC_API_URL=http://localhost:9100/api" >> .env && \
echo "VITE_RUST_API_URL=http://localhost:9100/api" >> .env
# Install build dependencies
RUN apk add --no-cache python3 make g++ git
# Copy package files
COPY package*.json ./
# Install dependencies including devDependencies (needed for Tailwind/Vite)
RUN npm ci --legacy-peer-deps --prefer-offline --no-audit --include=dev
# Copy source
COPY . .
# Build with memory optimization
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN npm run build
# Runtime stage
FROM ci.nxtgauge.com/admin/node:20-alpine
WORKDIR /app
# Copy built output
COPY --from=builder /app/.output ./.output
ENV PORT=9201
ENV HOST=0.0.0.0
EXPOSE 9201
CMD ["node", ".output/server/index.mjs"]