mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
Finish full migration to Drizzle
This commit is contained in:
parent
0ca77e9dcc
commit
b1ee6e5684
7 changed files with 5 additions and 43 deletions
|
|
@ -4,7 +4,6 @@
|
|||
# Commands:
|
||||
# - `start`: Starts the server
|
||||
# - `cli`: Starts the CLI, sends all arguments to it
|
||||
# - `prisma`: Execute a Prisma command, sends
|
||||
|
||||
# Exit immediately if a command exits with a non-zero status.
|
||||
set -euo pipefail
|
||||
|
|
@ -14,8 +13,6 @@ cd /app/dist
|
|||
# Parse first argument
|
||||
case "$1" in
|
||||
"start")
|
||||
# Migrate the database and run
|
||||
/bin/bash /app/entrypoint.sh prisma migrate deploy
|
||||
NITRO_PORT=5173 bun run ./frontend/server/index.mjs & NODE_ENV=production bun run ./index.js --prod
|
||||
;;
|
||||
"cli")
|
||||
|
|
@ -23,15 +20,6 @@ case "$1" in
|
|||
shift 1
|
||||
bun run ./cli.js "$@"
|
||||
;;
|
||||
"prisma")
|
||||
# Proxy all Prisma commands
|
||||
# Use output of dist/prisma.js to get the env variable
|
||||
shift 1
|
||||
# Set DATABASE_URL env variable to the output of bun run ./dist/prisma.js
|
||||
export DATABASE_URL=$(bun run ./prisma.js)
|
||||
# Execute the Prisma binary
|
||||
bun run ./node_modules/.bin/prisma "$@"
|
||||
;;
|
||||
*)
|
||||
# Run custom commands
|
||||
exec "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue