28 lines
771 B
Bash
Executable File
28 lines
771 B
Bash
Executable File
#!/bin/bash
|
|
if [ -d '/usr/app' ]; then
|
|
if [ ! -f 'config/application.yml' ]; then
|
|
echo ''
|
|
echo -e "\E[1;31m###################################"
|
|
echo "Missing application.yml"
|
|
echo -e "\E[1;32m cp config/application.yml.sample config/application.yml"
|
|
tput sgr0
|
|
echo "edit and update proper values"
|
|
echo ''
|
|
else
|
|
if [ ! -f '~/.container-setup' ]; then
|
|
bundle
|
|
npm install
|
|
bower install --allow-root
|
|
cd vendor/assets/ && bitters install && cd /usr/app
|
|
rails db:setup
|
|
rails db:migrate
|
|
rails db:fixtures:load
|
|
touch ~/.container-setup
|
|
fi
|
|
echo 'Delete ~/.container-setup and re-run startup script to update app.'
|
|
rails s -b 0.0.0.0
|
|
fi
|
|
else
|
|
echo "Are you in docker container?"
|
|
fi
|