Files
adamantium/script/setup
2023-01-27 22:55:09 +11:00

26 lines
452 B
Bash
Executable File

#!/bin/sh
# script/setup: Set up application for the first time after cloning, or set it
# back to the initial first unused state.
set -e
if [ ! -f ".env" ]; then
echo "==> Creating .env file"
cp .env-example .env
fi
if [ "$1" == "docker" ]; then
script/bootstrap docker
docker-compose up
else
cd "$(dirname "$0")/.."
script/bootstrap
echo "==> Setting up database..."
bin/hanami db setup
echo "==> App is now ready to go!"
fi