Skip to content

Commit 892c026

Browse files
committed
update docker
1 parent 9959a6f commit 892c026

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

.dockerignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Dependencies (reinstalled inside container)
2-
node_modules
2+
**/node_modules
33
.pnp
44
.pnp.js
55

66
# Build output (rebuilt inside container)
7-
.next
8-
out
9-
build
10-
dist
7+
**/.next
8+
**/out
9+
**/build
10+
**/dist
1111

1212
# Generated assets (created by postinstall from node_modules)
1313
apps/web/public/vad

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ WORKDIR /app
1313
# alone and resolves every workspace:* link.
1414
FROM base AS deps
1515
COPY pnpm-workspace.yaml package.json pnpm-lock.yaml .pnpmfile.cjs ./
16+
COPY patches ./patches/
1617
COPY packages/core/package.json ./packages/core/
1718
COPY packages/features/package.json ./packages/features/
1819
COPY apps/web/package.json ./apps/web/

apps/web/src/env.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from "node:path";
2+
import { fileURLToPath } from "node:url";
23
import { config as loadDotenv } from "dotenv";
34
import { z } from "zod";
45

@@ -8,7 +9,10 @@ import { z } from "zod";
89
// whether it's pulled in by next.config.ts, route handlers, scripts, or tests.
910
// dotenv leaves already-defined process.env entries untouched, so platform-set
1011
// vars (Vercel, Docker, root scripts that pre-load) win.
11-
loadDotenv({ path: path.resolve(__dirname, "../../../.env") });
12+
// apps/web is "type": "module", so __dirname is undefined under raw tsx — derive
13+
// from import.meta.url so backfill scripts and Next bundles both resolve it.
14+
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
15+
loadDotenv({ path: path.resolve(moduleDir, "../../../.env") });
1216

1317
const normalize = (value: unknown) =>
1418
typeof value === "string" && value.trim().length === 0 ? undefined : value;

0 commit comments

Comments
 (0)