Skip to content

Commit

Permalink
generate typed sql files
Browse files Browse the repository at this point in the history
We have to do this here because the --sql flag needs an active database
connection so we wait until right before starting the server when the
database is ready to go
  • Loading branch information
kentcdodds committed Feb 24, 2025
1 parent 78e3984 commit 48fdfa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion other/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ WORKDIR /myapp
COPY --from=deps /myapp/node_modules /myapp/node_modules

ADD prisma .
RUN npx prisma generate --sql
RUN npx prisma generate

ADD . .

Expand Down
3 changes: 3 additions & 0 deletions other/litefs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ exec:
- cmd: sqlite3 $CACHE_DATABASE_PATH "PRAGMA journal_mode = WAL;"
if-candidate: true

# Generate Typed SQL files
- cmd: npx prisma generate --sql

- cmd: npm start

0 comments on commit 48fdfa9

Please sign in to comment.