Files
plane/apps/admin/Dockerfile.fips
T
AaronandGitHub 308faaa861 chore: migrate to pnpm catalog v2, Turbo 2.8.13, @tailwindcss/vite (#6178)
- Migrate all dependencies to pnpm catalog v2 (catalogMode: prefer)
- Bump Turbo to 2.8.13
- Migrate silo from jest to vitest with vite-tsconfig-paths
- Switch all Vite apps (web, admin, space, mobile-editor) from @tailwindcss/postcss
  to @tailwindcss/vite plugin; delete all postcss.config.* files
- Migrate Storybook (propel, ui) to @tailwindcss/vite via viteFinal
- Consolidate @import "tailwindcss" into @plane/tailwindcss/index.css
- Rename packages/tailwind-config → packages/tailwindcss (@plane/tailwindcss)
  with style export condition matching tailwindcss package convention
- Add style export condition to @plane/editor and @plane/propel root exports
  so consumers can use @import "@plane/editor" and @import "@plane/propel"
- Normalize propel CSS: rename react-day-picker.css → src/styles/index.css
- Remove eslint-plugin-storybook from oxlint jsPlugins (crashes oxlint, known bug)
- Fix Docker build failures: NODE_ENV placement, tailwind dep resolution
- Revert TURBO_* remote cache secrets from Docker (incompatible with reusable action)
- Apply oxfmt auto-formatting across web, silo, space, packages
2026-03-10 00:02:41 +05:30

90 lines
2.7 KiB
Docker

FROM node:22-alpine AS base
WORKDIR /app
ENV TURBO_TELEMETRY_DISABLED=1
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ENV CI=1
RUN corepack enable pnpm
# =========================================================================== #
FROM base AS builder
ARG TURBO_VERSION=2.8.13
RUN pnpm add -g turbo@${TURBO_VERSION}
COPY . .
# Create a pruned workspace for just the admin app
RUN turbo prune --scope=admin --docker
# =========================================================================== #
FROM base AS installer
# Build in production mode; we still install dev deps explicitly below
ENV NODE_ENV=production
# Public envs required at build time (pick up via process.env)
ARG VITE_API_BASE_URL=""
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
ARG VITE_API_BASE_PATH="/api"
ENV VITE_API_BASE_PATH=$VITE_API_BASE_PATH
ARG VITE_ADMIN_BASE_URL=""
ENV VITE_ADMIN_BASE_URL=$VITE_ADMIN_BASE_URL
ARG VITE_ADMIN_BASE_PATH="/god-mode/"
ENV VITE_ADMIN_BASE_PATH=$VITE_ADMIN_BASE_PATH
ARG VITE_SPACE_BASE_URL=""
ENV VITE_SPACE_BASE_URL=$VITE_SPACE_BASE_URL
ARG VITE_SPACE_BASE_PATH="/spaces"
ENV VITE_SPACE_BASE_PATH=$VITE_SPACE_BASE_PATH
ARG VITE_LIVE_BASE_URL=""
ENV VITE_LIVE_BASE_URL=$VITE_LIVE_BASE_URL
ARG VITE_LIVE_BASE_PATH="/live"
ENV VITE_LIVE_BASE_PATH=$VITE_LIVE_BASE_PATH
ARG VITE_WEB_BASE_URL=""
ENV VITE_WEB_BASE_URL=$VITE_WEB_BASE_URL
ARG VITE_WEB_BASE_PATH=""
ENV VITE_WEB_BASE_PATH=$VITE_WEB_BASE_PATH
ARG VITE_WEBSITE_URL="https://plane.so"
ENV VITE_WEBSITE_URL=$VITE_WEBSITE_URL
ARG VITE_SUPPORT_EMAIL="[email protected]"
ENV VITE_SUPPORT_EMAIL=$VITE_SUPPORT_EMAIL
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
# Copy full directory structure before fetch to ensure all package.json files are available
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json
# 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
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store CI=true pnpm install --offline --frozen-lockfile --store-dir=/pnpm/store --prod=false
# Build only the admin package
RUN pnpm turbo run build --filter=admin
# =========================================================================== #
FROM registry.access.redhat.com/ubi10/nginx-126 AS production
COPY apps/admin/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=installer /app/apps/admin/build/client /usr/share/nginx/html/god-mode
EXPOSE 3000
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;"]