Skip to content

Commit

Permalink
npx needed for litestream restore too
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Jan 11, 2025
1 parent 60efe5d commit 8473338
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/docker-entrypoint.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ if (process.env.DATABASE_URL) {
<% } -%>
<% if (litestream && sqlite3 && (prismaFile || prismaEnv)) { -%>
<%= tab(n) %>if (newDb && process.env.BUCKET_NAME) {
<%= tab(n+1) %>await exec(`litestream restore -config litestream.yml -if-replica-exists ${target}`)
<%= tab(n+1) %>await exec(`<% if (setupScriptType == 'dbsetup') { %>npx <% } %>litestream restore -config litestream.yml -if-replica-exists ${target}`)
<% if (prismaSeed && sqlite3 && (prismaFile || prismaEnv)) { -%>
<%= tab(n+1) %>newDb = !fs.existsSync(target)
<% } -%>
Expand Down

0 comments on commit 8473338

Please sign in to comment.