@@ -51,32 +51,21 @@ ENV DATABASE_URL="file:/app/data/sovereign.db"
5151ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
5252RUN corepack enable && corepack prepare yarn@1.22.22 --activate
5353
54- # Copy only the files needed to run a production install
55- COPY package.json yarn.lock ./
56-
57- # Production-only deps, no scripts (they’ve already run in build stage)
58- RUN --mount=type=cache,target=/usr/local/share/.cache/yarn \
59- yarn install --frozen-lockfile --production --ignore-scripts
60-
6154# Bring built app and prisma **artifacts** (client + engine) from build
62- COPY --from=build /app/dist ./dist
55+ # Copy the platform app since the runtime entry is /platform/index.cjs
56+ COPY --from=build /app/platform ./platform
6357COPY --from=build /app/prisma ./prisma
6458
6559# Copy Prisma client output generated during build (so we don't need prisma CLI now)
6660COPY --from=build /app/node_modules/@prisma ./node_modules/@prisma
6761COPY --from=build /app/node_modules/.prisma ./node_modules/.prisma
6862
69-
70-
71- # Copy production node_modules from deps
72- COPY --from=deps /app/node_modules ./node_modules
63+ # Copy node_modules from build (matches built artifacts and avoids registry lookups)
64+ COPY --from=build /app/node_modules ./node_modules
7365
7466# Copy build artifacts and required folders
7567COPY --from=build /app/package.json ./package.json
7668
77- # Ensure Prisma client is generated for the runtime environment
78- RUN yarn prisma generate
79-
8069# Prepare persistent data directory for sqlite
8170RUN mkdir -p /app/data \
8271 && chown node:node /app/data
@@ -90,4 +79,4 @@ USER node
9079EXPOSE 5000
9180
9281ENTRYPOINT ["/usr/bin/tini" , "--" , "/entrypoint.sh" ]
93- CMD ["node" , "dist /index.mjs " ]
82+ CMD ["node" , "platform /index.cjs " ]
0 commit comments