Fix entrypoint

This commit is contained in:
Jesse Wierzbinski 2024-04-07 01:34:21 -10:00
parent afa760d893
commit 04b76aaabc
No known key found for this signature in database

View file

@ -15,12 +15,14 @@ cd /app/dist
case "$1" in case "$1" in
"start") "start")
# Migrate the database # Migrate the database
exec /bin/bash /app/entrypoint.sh prisma migrate deploy && bun run ./index.js --prod /bin/bash /app/entrypoint.sh prisma migrate deploy
# Run
bun run ./index.js --prod
;; ;;
"cli") "cli")
# Start the CLI # Start the CLI
shift 1 shift 1
exec bun run ./cli.js "$@" bun run ./cli.js "$@"
;; ;;
"prisma") "prisma")
# Proxy all Prisma commands # Proxy all Prisma commands
@ -29,7 +31,7 @@ case "$1" in
# Set DATABASE_URL env variable to the output of bun run ./dist/prisma.js # Set DATABASE_URL env variable to the output of bun run ./dist/prisma.js
export DATABASE_URL=$(bun run ./prisma.js) export DATABASE_URL=$(bun run ./prisma.js)
# Execute the Prisma binary # Execute the Prisma binary
exec bun run ./node_modules/.bin/prisma "$@" bun run ./node_modules/.bin/prisma "$@"
;; ;;
*) *)
# Run custom commands # Run custom commands