diff --git a/package-lock.json b/package-lock.json index 4d3a6bc..5c9c661 100644 --- a/package-lock.json +++ b/package-lock.json @@ -551,6 +551,22 @@ "node": ">=18" } }, + "node_modules/@flydotio/litestream-darwin-x64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@flydotio/litestream-darwin-x64/-/litestream-darwin-x64-1.0.0.tgz", + "integrity": "sha512-rvX/o3SFFoqpOP2wX7fVDKYqHV6ZX5IWjf4rHAfKFuc0CtrY/AEw4LSoNiRE8CbbmI8OFLmD4FYSJYWIVBez3Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@flydotio/litestream-linux-arm64": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@flydotio/litestream-linux-arm64/-/litestream-linux-arm64-1.0.0.tgz", @@ -567,6 +583,22 @@ "node": ">=18" } }, + "node_modules/@flydotio/litestream-linux-x64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@flydotio/litestream-linux-x64/-/litestream-linux-x64-1.0.0.tgz", + "integrity": "sha512-j3iPCCBv2euujtCbAZvrQvaFNvPpe7hFHci3Oblk1Rj4p2hXJXvFSHTTJXqD74hnt0DUN5qZi7+GWFMbkLastg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", diff --git a/templates/docker-entrypoint.ejs b/templates/docker-entrypoint.ejs index e744ba0..2c6ccbe 100755 --- a/templates/docker-entrypoint.ejs +++ b/templates/docker-entrypoint.ejs @@ -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) <% } -%>