Skip to content

Commit 93b6d42

Browse files
committed
fix docker issues
1 parent bdec5a7 commit 93b6d42

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

Dockerfile

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,32 +51,21 @@ ENV DATABASE_URL="file:/app/data/sovereign.db"
5151
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
5252
RUN 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
6357
COPY --from=build /app/prisma ./prisma
6458

6559
# Copy Prisma client output generated during build (so we don't need prisma CLI now)
6660
COPY --from=build /app/node_modules/@prisma ./node_modules/@prisma
6761
COPY --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
7567
COPY --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
8170
RUN mkdir -p /app/data \
8271
&& chown node:node /app/data
@@ -90,4 +79,4 @@ USER node
9079
EXPOSE 5000
9180

9281
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]
93-
CMD ["node", "dist/index.mjs"]
82+
CMD ["node", "platform/index.cjs"]

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"lint-staged": "^16.2.6"
5353
},
5454
"devDependencies": {
55-
"@sovereign/ui-assets": "0.0.0",
5655
"@eslint/js": "^9.36.0",
5756
"eslint": "^9.36.0",
5857
"eslint-config-prettier": "^10.1.8",

0 commit comments

Comments
 (0)