fix(deploy): force dev deps in Docker deps stage; commit prod NEXT_PUBLIC_*
Coolify injects NODE_ENV=production at build time, causing `pnpm install --frozen-lockfile` to skip devDependencies. Next.js build then fails on missing @tailwindcss/postcss. Override NODE_ENV=development and pass --prod=false for the install step only. Builder stage still runs `next build` with NODE_ENV=production, which is the intended runtime mode. Also commits apps/dashboard/.env.production with public URLs so Next.js bakes NEXT_PUBLIC_* into the bundle at build time (Coolify API rejects the is_build_time flag, so we can't mark them runtime).
This commit is contained in:
parent
2505fccd5f
commit
cd66daa6b1
@ -19,7 +19,9 @@ COPY packages/api/package.json ./packages/api/
|
|||||||
COPY packages/ui/package.json ./packages/ui/
|
COPY packages/ui/package.json ./packages/ui/
|
||||||
COPY packages/eslint-config/package.json ./packages/eslint-config/
|
COPY packages/eslint-config/package.json ./packages/eslint-config/
|
||||||
COPY packages/typescript-config/package.json ./packages/typescript-config/
|
COPY packages/typescript-config/package.json ./packages/typescript-config/
|
||||||
RUN pnpm install --frozen-lockfile
|
# Force dev deps even when Coolify injects NODE_ENV=production at build time.
|
||||||
|
# Tailwind / postcss / next types are devDependencies — required by `next build`.
|
||||||
|
RUN NODE_ENV=development pnpm install --frozen-lockfile --prod=false
|
||||||
|
|
||||||
# ────────────────────────────────────────────────────────────
|
# ────────────────────────────────────────────────────────────
|
||||||
# Stage 3: builder — build dashboard with standalone output
|
# Stage 3: builder — build dashboard with standalone output
|
||||||
|
|||||||
6
apps/dashboard/.env.production
Normal file
6
apps/dashboard/.env.production
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Committed prod env — Next.js bakes NEXT_PUBLIC_* into the bundle at build time.
|
||||||
|
# Only public URLs here. Secrets stay in Coolify env vars (runtime).
|
||||||
|
|
||||||
|
NEXT_PUBLIC_API_URL=https://api.reparee.com
|
||||||
|
NEXT_PUBLIC_SAAS_URL=https://reparee.com
|
||||||
|
NEXT_PUBLIC_GARAGE_HOST_PATTERN=*.reparee.com
|
||||||
Loading…
x
Reference in New Issue
Block a user