Initial commit
This commit is contained in:
25
script/setup
Executable file
25
script/setup
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/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
|
Reference in New Issue
Block a user