Fix console Docker build: resolve @elydora/shared path alias
The console imports types from @elydora/shared which maps to ../server/src/shared via tsconfig paths. Changed Docker build context to repo root so server shared types are accessible during the Next.js build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f3c04312fd
commit
31f068655f
3 files changed
+22
-4
No files matched your search
@@ -0,0 +1,10 @@
|
|||||||
|
.git
|
||||||
|
*.md
|
||||||
|
packages/console/node_modules
|
||||||
|
packages/console/.next
|
||||||
|
packages/console/out
|
||||||
|
packages/server/node_modules
|
||||||
|
packages/server/dist
|
||||||
|
sdks/
|
||||||
|
helm/
|
||||||
|
scripts/
|
||||||
+2
-2
@@ -278,8 +278,8 @@ services:
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
console:
|
console:
|
||||||
build:
|
build:
|
||||||
context: ./packages/console
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: packages/console/Dockerfile
|
||||||
args:
|
args:
|
||||||
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL:-http://localhost:8787}
|
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL:-http://localhost:8787}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -2,9 +2,17 @@
|
|||||||
# Stage 1: Install deps and build
|
# Stage 1: Install deps and build
|
||||||
FROM node:20-alpine AS builder
|
FROM node:20-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json package-lock.json* ./
|
|
||||||
|
# Copy console package files
|
||||||
|
COPY packages/console/package.json packages/console/package-lock.json* ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
COPY . .
|
|
||||||
|
# Copy console source
|
||||||
|
COPY packages/console/ .
|
||||||
|
|
||||||
|
# Copy server shared types (used via @elydora/shared path alias)
|
||||||
|
COPY packages/server/src/shared ../server/src/shared
|
||||||
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ARG NEXT_PUBLIC_API_BASE_URL=http://localhost:8787
|
ARG NEXT_PUBLIC_API_BASE_URL=http://localhost:8787
|
||||||
ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL
|
ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL
|
||||||
|
|||||||
Reference in new issue
Block a user