From e416f2fe8fbbd398224d79af5e0cfd4c5e58c34b Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Fri, 10 Apr 2026 19:46:36 +0200 Subject: [PATCH] fix(docker): use simpler single-stage Dockerfile - Add Dockerfile.simple with single-stage build - Update woodpecker to use Dockerfile.simple - Remove multi-stage complexity --- .woodpecker.yml | 2 +- Dockerfile.simple | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.simple diff --git a/.woodpecker.yml b/.woodpecker.yml index e295c0d..a0db28b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -8,7 +8,7 @@ steps: settings: registry: docker-registry.registry.svc.cluster.local:5000 repo: docker-registry.registry.svc.cluster.local:5000/nxtgauge-admin-solid - dockerfile: Dockerfile + dockerfile: Dockerfile.simple tags: - ${CI_COMMIT_SHA} - latest diff --git a/Dockerfile.simple b/Dockerfile.simple new file mode 100644 index 0000000..b11f7e5 --- /dev/null +++ b/Dockerfile.simple @@ -0,0 +1,31 @@ +FROM node:20-slim + +WORKDIR /app + +# Skip browser downloads +ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 +ENV CYPRESS_INSTALL_BINARY=0 + +# Install dependencies +RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/* + +# Copy package files +COPY package*.json ./ +RUN npm ci --legacy-peer-deps + +# Copy all source files +COPY . . + +# Create env file +RUN echo "GATEWAY_URL=http://localhost:9100" > .env + +# Build +ENV NODE_OPTIONS="--max-old-space-size=4096" +RUN npm run build + +ENV PORT=9202 +ENV HOST=0.0.0.0 + +EXPOSE 9102 + +CMD ["node", ".output/server/index.mjs"]