DiscordTickets/scripts/start.sh
Daleth Darko 978eb92781
fix(docker): start script (#513)
* Denote to the system environment that it is running in docker

* Fix start script to use sh instead of bash and check if in docker
2024-01-11 04:57:43 +00:00

20 lines
377 B
Bash
Executable File

#!/usr/bin/env sh
if [ "$DOCKER" = "true" ]; then
base_dir="/app"
else
source="${BASH_SOURCE}"
base_dir=$(dirname $(dirname "$source"))
fi
echo "Checking environment..."
script=scripts/preinstall
node "$base_dir/$script"
echo "Preparing the database..."
script=scripts/postinstall
node "$base_dir/$script"
echo "Starting..."
script=src/
node "$base_dir/$script"