Files
adamantium/script/setup

26 lines
457 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..."
hanami db structure load
echo "==> App is now ready to go!"
fi