Fix seeder: skip heavy devDeps, decouple app from seeder success
- Use npm ci --omit=dev to avoid building sharp (needs native libvips not available on Alpine) then install tsx separately - Change app depends_on from seeder (service_completed_successfully) to relay only, so the app still starts even if seeding fails Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,9 +7,10 @@ FROM node:20-alpine
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies (need full install so tsx/esbuild get their binaries)
|
# Install only production deps (skip sharp & other heavy devDeps),
|
||||||
|
# then add tsx separately so we can run TypeScript seed scripts.
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci --omit=dev && npm install --no-save tsx
|
||||||
|
|
||||||
# Copy only what the seed scripts need
|
# Copy only what the seed scripts need
|
||||||
COPY scripts/ ./scripts/
|
COPY scripts/ ./scripts/
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "7777:7777"
|
- "7777:7777"
|
||||||
depends_on:
|
depends_on:
|
||||||
seeder:
|
- relay
|
||||||
condition: service_completed_successfully
|
|
||||||
networks:
|
networks:
|
||||||
- indeedhub-network
|
- indeedhub-network
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
Reference in New Issue
Block a user