mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
18 lines
303 B
Bash
Executable file
18 lines
303 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
if [ -d "./server/dist" ]
|
|
then
|
|
SETUP_CMD='npm run db:setup:prod'
|
|
else
|
|
SETUP_CMD='npm run db:setup'
|
|
fi
|
|
|
|
if [ -f "./.env" ]
|
|
then
|
|
declare $(grep -v '^#' ./.env | xargs)
|
|
fi
|
|
|
|
./server/scripts/wait-for-it.sh $PG_HOST:${PG_PORT:-5432} --strict --timeout=300 -- $SETUP_CMD
|
|
|
|
exec "$@"
|