Files
indee-demo/Dockerfile.seed
Dorian e3ce88dc13 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 <cursoragent@cursor.com>
2026-02-12 12:58:49 +00:00

28 lines
939 B
Docker

# Seeder container — populates the Nostr relay with test profiles,
# reactions, and comments so the dev deployment has content.
#
# Runs once and exits. docker-compose "restart: no" keeps it from looping.
FROM node:20-alpine
WORKDIR /app
# 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
# Copy only what the seed scripts need
COPY scripts/ ./scripts/
COPY src/data/testPersonas.ts ./src/data/testPersonas.ts
COPY tsconfig.json ./
# Default env (overridden by docker-compose)
ENV RELAY_URL=ws://relay:8080
ENV ORIGIN=http://localhost:7777
# 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!'"]