Skip to content

Commit

Permalink
support prisma remix example (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys authored Dec 24, 2024
1 parent f519060 commit 6d34c93
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions gdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,8 @@ export class GDF {
return [this.npx, 'foreman', 'start', '--procfile', 'Procfile.prod']
} else if (this.standaloneNextjs) {
return ['node', 'server.js']
} else if (this.remix && this.#pj.scripts?.start === 'remix-serve build') {
return [this.npx, 'remix-serve', './build/index.js']
}

if (this.options.distroless) {
Expand Down
2 changes: 1 addition & 1 deletion test/base/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ ENTRYPOINT [ "/app/docker-entrypoint.js" ]
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
ENV DATABASE_URL="file:///data/sqlite.db"
CMD [ "npm", "run", "start" ]
CMD [ "npx", "remix-serve", "./build/index.js" ]
2 changes: 1 addition & 1 deletion test/base/windows/docker-entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const env = { ...process.env }

;(async() => {
// If running the web server then migrate existing database
if (process.argv.slice(2).join(' ') === 'npm run start') {
if (process.argv.slice(2).join(' ') === 'npx remix-serve ./build/index.js') {
await exec('npx prisma migrate deploy')
}

Expand Down
2 changes: 1 addition & 1 deletion test/frameworks/remix-indie/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ ENTRYPOINT [ "/app/docker-entrypoint.js" ]
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
ENV DATABASE_URL="file:///data/sqlite.db"
CMD [ "npm", "run", "start" ]
CMD [ "npx", "remix-serve", "./build/index.js" ]
2 changes: 1 addition & 1 deletion test/frameworks/remix-indie/docker-entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const env = { ...process.env }

;(async() => {
// If running the web server then migrate existing database
if (process.argv.slice(2).join(' ') === 'npm run start') {
if (process.argv.slice(2).join(' ') === 'npx remix-serve ./build/index.js') {
await exec('npx prisma migrate deploy')
}

Expand Down
2 changes: 1 addition & 1 deletion test/frameworks/remix-pnpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ COPY --from=build /app /app

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "pnpm", "run", "start" ]
CMD [ "npx", "remix-serve", "./build/index.js" ]

0 comments on commit 6d34c93

Please sign in to comment.