From e3ce88dc13bf4d2039cbc868e64650c51c2a9ca9 Mon Sep 17 00:00:00 2001 From: Dorian Date: Thu, 12 Feb 2026 12:58:49 +0000 Subject: [PATCH] Fix seeder: install tsx globally, add verbose CMD output - Install tsx globally to avoid lockfile conflicts with --omit=dev - Use set -ex in CMD so Docker logs show exactly which step fails - Production deps installed cleanly via npm ci --omit=dev Co-authored-by: Cursor --- Dockerfile.seed | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile.seed b/Dockerfile.seed index 7048cda..7986feb 100644 --- a/Dockerfile.seed +++ b/Dockerfile.seed @@ -7,10 +7,12 @@ FROM node:20-alpine WORKDIR /app -# Install only production deps (skip sharp & other heavy devDeps), -# then add tsx separately so we can run TypeScript seed scripts. +# Install tsx globally (isolated from project deps, avoids lockfile conflicts) +RUN npm install -g tsx + +# Install only production deps (no sharp or other heavy native devDeps) COPY package*.json ./ -RUN npm ci --omit=dev && npm install --no-save tsx +RUN npm ci --omit=dev # Copy only what the seed scripts need COPY scripts/ ./scripts/ @@ -21,4 +23,5 @@ COPY tsconfig.json ./ ENV RELAY_URL=ws://relay:8080 ENV ORIGIN=http://localhost:7777 -CMD ["sh", "-c", "node scripts/wait-for-relay.mjs && npx tsx scripts/seed-profiles.ts && npx tsx scripts/seed-activity.ts && echo '✅ Seeding complete!'"] +# set -ex: print each command before running, exit on first failure +CMD ["sh", "-c", "set -ex && node scripts/wait-for-relay.mjs && tsx scripts/seed-profiles.ts && tsx scripts/seed-activity.ts && echo 'Seeding complete!'"]