From 0f2bee21a9f99dfd233c62e6fb00d57a14a0a2e4 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Tue, 17 Feb 2026 16:08:48 -0700 Subject: [PATCH] fix: use parent context in Docker build for encryptid-sdk dependency The file: link to ../encryptid-sdk requires the build context to be the parent directory so Docker can access the SDK as a sibling. Co-Authored-By: Claude Opus 4.6 --- Dockerfile | 17 +++++++++++------ docker-compose.yml | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3f583d7..52acc98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,25 @@ # rMaps.online - Friend-finding navigation # Multi-stage build for optimized production image +FROM node:20-alpine AS base + # Stage 1: Dependencies -FROM node:20-alpine AS deps +FROM base AS deps RUN apk add --no-cache libc6-compat WORKDIR /app -COPY package.json package-lock.json* ./ -RUN npm ci +COPY rmaps-online/package.json rmaps-online/package-lock.json* ./ +# Copy local SDK dependency (package.json references file:../encryptid-sdk) +COPY encryptid-sdk /encryptid-sdk/ +RUN npm ci || npm install # Stage 2: Build -FROM node:20-alpine AS builder +FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules -COPY . . +COPY --from=deps /encryptid-sdk /encryptid-sdk +COPY rmaps-online/ . ENV NEXT_TELEMETRY_DISABLED=1 ENV NODE_ENV=production @@ -22,7 +27,7 @@ ENV NODE_ENV=production RUN npm run build # Stage 3: Production -FROM node:20-alpine AS runner +FROM base AS runner WORKDIR /app ENV NODE_ENV=production diff --git a/docker-compose.yml b/docker-compose.yml index 1a72e81..6c26880 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,8 +3,8 @@ version: '3.8' services: rmaps: build: - context: . - dockerfile: Dockerfile + context: .. + dockerfile: rmaps-online/Dockerfile container_name: rmaps-online restart: unless-stopped environment: