run migrations if no db

This commit is contained in:
Milo Schwartz 2024-10-26 23:37:25 -04:00
parent 25224e0343
commit 2d5ff17515
No known key found for this signature in database
4 changed files with 28 additions and 3 deletions

View file

@ -8,6 +8,9 @@ RUN npm install --legacy-peer-deps
COPY . .
RUN npx drizzle-kit generate --dialect sqlite --schema ./server/db/schema.ts --out migrations
RUN ls migrations
RUN npm run build
FROM node:20-alpine AS runner
@ -22,6 +25,7 @@ RUN npm install --omit=dev --legacy-peer-deps
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/migrations ./dist/migrations
COPY config.example.yml ./dist/config.example.yml
COPY server/db/names.json ./dist/names.json