- Convert all @bytelyst/* file: refs to semver ^0.1.0 (backend, web, mobile) - Remove sibling common-plat workspace references from pnpm-workspace.yaml - Add .npmrc and .npmrc.docker for local Gitea registry - Rewrite backend/web Dockerfiles: pnpm + BuildKit secret mount + corp proxy - Fix backend tsconfig.json: remove explicit lib to resolve fetch Response types - Verified: host-side pnpm install, backend tests (86 pass), backend+web Docker builds
46 lines
1.5 KiB
Docker
46 lines
1.5 KiB
Docker
FROM node:22-alpine AS builder
|
|
WORKDIR /app/web
|
|
|
|
ARG GITEA_NPM_HOST
|
|
ENV HTTP_PROXY=http://cso.proxy.att.com:8080/
|
|
ENV HTTPS_PROXY=http://cso.proxy.att.com:8080/
|
|
ENV NO_PROXY=localhost,127.0.0.1,host.docker.internal,gateway.docker.internal,192.168.65.254,192.168.86.40
|
|
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
ENV NPM_CONFIG_STRICT_SSL=false
|
|
ENV GITEA_NPM_HOST=$GITEA_NPM_HOST
|
|
|
|
RUN npm config set strict-ssl false \
|
|
&& npm config set registry https://jfrog-pkg-proxy.it.att.com/artifactory/api/npm/att-npm-proxy-group/ \
|
|
&& npm install -g pnpm@10.6.5
|
|
|
|
COPY .npmrc.docker ./.npmrc
|
|
COPY web/package.json ./package.json
|
|
RUN --mount=type=secret,id=gitea_npm_token \
|
|
export GITEA_NPM_TOKEN="$(cat /run/secrets/gitea_npm_token)" && \
|
|
pnpm install --ignore-scripts --lockfile=false
|
|
|
|
COPY web/next.config.ts ./next.config.ts
|
|
COPY web/tsconfig.json ./tsconfig.json
|
|
COPY web/next-env.d.ts ./next-env.d.ts
|
|
COPY web/src/ ./src/
|
|
COPY shared/ ../shared/
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
RUN pnpm run build
|
|
|
|
FROM node:22-alpine
|
|
WORKDIR /app/web
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
ENV HTTP_PROXY=http://cso.proxy.att.com:8080/
|
|
ENV HTTPS_PROXY=http://cso.proxy.att.com:8080/
|
|
ENV NO_PROXY=localhost,127.0.0.1,host.docker.internal,gateway.docker.internal,192.168.65.254,192.168.86.40
|
|
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
ENV NPM_CONFIG_STRICT_SSL=false
|
|
|
|
COPY --from=builder /app/web/.next/standalone ./
|
|
COPY --from=builder /app/web/.next/static ./.next/static
|
|
|
|
EXPOSE 3000
|
|
CMD ["node", "server.js"]
|