2025-08-19 07:36:42 -07:00
|
|
|
# syntax=docker/dockerfile:1.7
|
2025-07-04 16:28:30 +05:30
|
|
|
FROM node:22-alpine AS base
|
2025-01-09 16:05:39 +05:30
|
|
|
|
2025-08-19 07:36:42 -07:00
|
|
|
# Setup pnpm package manager with corepack and configure global bin directory for caching
|
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
2026-05-15 01:05:14 +05:30
|
|
|
ENV PATH="$PNPM_HOME:$PNPM_HOME/bin:$PATH"
|
2025-08-19 07:36:42 -07:00
|
|
|
RUN corepack enable
|
|
|
|
|
|
2024-05-10 02:32:42 +05:30
|
|
|
# *****************************************************************************
|
2024-01-09 22:50:51 +05:30
|
|
|
# STAGE 1: Build the project
|
2024-05-10 02:32:42 +05:30
|
|
|
# *****************************************************************************
|
2025-01-09 16:05:39 +05:30
|
|
|
FROM base AS builder
|
2022-12-02 00:28:31 +05:30
|
|
|
RUN apk add --no-cache libc6-compat
|
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
chore: bump turbo to 2.9.14, migrate pnpm config to workspace yaml (#9147)
* chore: bump turbo to 2.9.14, migrate pnpm config to workspace yaml
- Bump turbo from 2.9.4 to 2.9.14 in root package.json and the
four production Dockerfiles (web, live, admin, space).
- Move pnpm.overrides, onlyBuiltDependencies, and
ignoredBuiltDependencies from package.json into pnpm-workspace.yaml.
pnpm v10+ no longer reads the pnpm field in package.json, so the
full overrides block and most of onlyBuiltDependencies were being
silently ignored.
- Add @plane/utils as a workspace dependency to the live server.
* chore: drop unused allowBuilds block, bump lodash-es to 4.18.1
- Remove the `allowBuilds` block from pnpm-workspace.yaml. It is not
a recognized pnpm v10/v11 key and its values were inconsistent with
the actual `onlyBuiltDependencies` / `ignoredBuiltDependencies`
configuration.
- Bump `lodash-es` catalog entry from 4.18.0 to 4.18.1. With overrides
now applied workspace-wide, 4.18.0 (marked deprecated as a "bad
release") was being enforced everywhere.
* fix: use pnpm v11 allowBuilds in place of removed legacy keys
`onlyBuiltDependencies` and `ignoredBuiltDependencies` were removed
in pnpm v11. They were being silently ignored on this branch, which
caused `ERR_PNPM_IGNORED_BUILDS` to fail CI under `--frozen-lockfile`.
Replace them with the v11-native `allowBuilds:` block, mapping the
previous allowlist to `true` and the previous denylist (sharp) to
`false`. Locally verified that the build scripts for @parcel/watcher,
@swc/core, esbuild, and msgpackr-extract now run on install.
2026-05-27 16:06:15 +05:30
|
|
|
ARG TURBO_VERSION=2.9.14
|
2025-08-19 07:36:42 -07:00
|
|
|
RUN corepack enable pnpm && pnpm add -g turbo@${TURBO_VERSION}
|
2023-02-21 11:31:43 +05:30
|
|
|
COPY . .
|
2022-12-02 00:28:31 +05:30
|
|
|
|
2023-09-03 18:50:30 +05:30
|
|
|
RUN turbo prune --scope=web --docker
|
2022-12-02 00:28:31 +05:30
|
|
|
|
2024-05-10 02:32:42 +05:30
|
|
|
# *****************************************************************************
|
2024-01-09 22:50:51 +05:30
|
|
|
# STAGE 2: Install dependencies & build the project
|
2024-05-10 02:32:42 +05:30
|
|
|
# *****************************************************************************
|
2022-12-02 00:28:31 +05:30
|
|
|
# Add lockfile and package.json's of isolated subworkspace
|
2025-01-09 16:05:39 +05:30
|
|
|
FROM base AS installer
|
2022-12-02 00:28:31 +05:30
|
|
|
|
|
|
|
|
RUN apk add --no-cache libc6-compat
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# First install the dependencies (as they change less often)
|
|
|
|
|
COPY .gitignore .gitignore
|
|
|
|
|
COPY --from=builder /app/out/json/ .
|
2025-08-19 07:36:42 -07:00
|
|
|
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
|
|
|
|
RUN corepack enable pnpm
|
2022-12-02 00:28:31 +05:30
|
|
|
|
2025-12-04 16:35:19 +05:30
|
|
|
# Copy full directory structure before fetch to ensure all package.json files are available
|
2022-12-02 00:28:31 +05:30
|
|
|
COPY --from=builder /app/out/full/ .
|
|
|
|
|
COPY turbo.json turbo.json
|
2025-12-04 16:35:19 +05:30
|
|
|
|
|
|
|
|
# Fetch dependencies to cache store, then install offline with dev deps
|
|
|
|
|
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store pnpm fetch --store-dir=/pnpm/store
|
2025-11-10 18:28:51 +05:30
|
|
|
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store CI=true pnpm install --offline --frozen-lockfile --store-dir=/pnpm/store
|
2024-04-08 15:01:17 +05:30
|
|
|
|
2025-11-12 19:03:47 +05:30
|
|
|
ARG VITE_API_BASE_URL=""
|
|
|
|
|
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
|
2023-09-04 18:46:10 +05:30
|
|
|
|
2025-11-12 19:03:47 +05:30
|
|
|
ARG VITE_ADMIN_BASE_URL=""
|
|
|
|
|
ENV VITE_ADMIN_BASE_URL=$VITE_ADMIN_BASE_URL
|
2022-12-13 02:06:25 +05:30
|
|
|
|
2025-11-12 19:03:47 +05:30
|
|
|
ARG VITE_ADMIN_BASE_PATH="/god-mode"
|
|
|
|
|
ENV VITE_ADMIN_BASE_PATH=$VITE_ADMIN_BASE_PATH
|
2024-01-09 22:50:51 +05:30
|
|
|
|
2025-11-12 19:03:47 +05:30
|
|
|
ARG VITE_LIVE_BASE_URL=""
|
|
|
|
|
ENV VITE_LIVE_BASE_URL=$VITE_LIVE_BASE_URL
|
2024-09-02 17:54:12 +05:30
|
|
|
|
2025-11-12 19:03:47 +05:30
|
|
|
ARG VITE_LIVE_BASE_PATH="/live"
|
|
|
|
|
ENV VITE_LIVE_BASE_PATH=$VITE_LIVE_BASE_PATH
|
2024-09-02 17:54:12 +05:30
|
|
|
|
2025-11-12 19:03:47 +05:30
|
|
|
ARG VITE_SPACE_BASE_URL=""
|
|
|
|
|
ENV VITE_SPACE_BASE_URL=$VITE_SPACE_BASE_URL
|
2024-05-10 02:32:42 +05:30
|
|
|
|
2025-11-12 19:03:47 +05:30
|
|
|
ARG VITE_SPACE_BASE_PATH="/spaces"
|
|
|
|
|
ENV VITE_SPACE_BASE_PATH=$VITE_SPACE_BASE_PATH
|
2024-01-09 22:50:51 +05:30
|
|
|
|
2025-11-12 19:03:47 +05:30
|
|
|
ARG VITE_WEB_BASE_URL=""
|
|
|
|
|
ENV VITE_WEB_BASE_URL=$VITE_WEB_BASE_URL
|
2024-05-23 13:38:20 +05:30
|
|
|
|
2025-07-03 01:08:49 +05:30
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
|
ENV TURBO_TELEMETRY_DISABLED=1
|
2024-05-10 02:32:42 +05:30
|
|
|
|
2025-08-19 07:36:42 -07:00
|
|
|
RUN pnpm turbo run build --filter=web
|
2024-05-10 02:32:42 +05:30
|
|
|
|
|
|
|
|
# *****************************************************************************
|
2025-11-06 14:08:48 +05:30
|
|
|
# STAGE 3: Serve with nginx
|
2024-05-10 02:32:42 +05:30
|
|
|
# *****************************************************************************
|
2026-05-26 14:25:01 +05:30
|
|
|
FROM nginx:1.29-alpine AS production
|
|
|
|
|
|
|
|
|
|
RUN apk update && apk upgrade --no-cache && rm -rf /var/cache/apk/*
|
2024-05-10 02:32:42 +05:30
|
|
|
|
2025-11-06 14:08:48 +05:30
|
|
|
COPY apps/web/nginx/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
|
COPY --from=installer /app/apps/web/build/client /usr/share/nginx/html
|
2022-12-13 02:06:25 +05:30
|
|
|
|
2025-07-04 13:59:14 +05:30
|
|
|
EXPOSE 3000
|
|
|
|
|
|
2025-11-06 14:08:48 +05:30
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
|
|
|
CMD curl -fsS http://127.0.0.1:3000/ >/dev/null || exit 1
|
|
|
|
|
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|