c8aaea8ad0
* WIP * Report ECS task info on startup and shutdown * Fixed lifecycle name * Re-add terminus * Require the build dir when http server is disabled * Remove unnecessary logs * Implement graceful shutdown in ZodWorker * Re-order some code * Increase the keepAliveTimeout to 65 seconds to prevent LB 502 errors
20 lines
600 B
Bash
Executable File
20 lines
600 B
Bash
Executable File
#!/bin/sh
|
|
set -x
|
|
|
|
if [ -n "$DATABASE_HOST" ]; then
|
|
scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up"
|
|
fi
|
|
|
|
# Run migrations
|
|
pnpm --filter @trigger.dev/database db:migrate:deploy
|
|
|
|
# Copy over required prisma files and invoke bundled seed file
|
|
cp packages/database/prisma/schema.prisma apps/webapp/prisma/
|
|
cp node_modules/@prisma/engines/*.node apps/webapp/prisma/
|
|
pnpm --filter webapp db:seed
|
|
|
|
cd /triggerdotdev/apps/webapp
|
|
# exec dumb-init pnpm run start:local
|
|
NODE_PATH='/triggerdotdev/node_modules/.pnpm/node_modules' exec dumb-init node --max-old-space-size=8192 ./build/server.js
|
|
|