devstart
#!/bin/bash
set -e
echo ''
echo '_________ .__ '
echo '\_ ___ \| | _____ ______ _____________ ____ ____ _____ '
echo '/ \ \/| | \__ \ / ___// ___/\_ __ \/ _ \ / _ \ / \ '
echo '\ \___| |__/ __ \_\___ \ \___ \ | | \( <_> | <_> ) Y Y \'
echo ' \______ /____(____ /____ >____ > |__| \____/ \____/|__|_| /'
echo ' \/ \/ \/ \/ \/ '
echo ''
echo "[MumukiDevstart::Classroom] Installing dependencies...."
bundle install --quiet
if ! pgrep -x "mongod" > /dev/null
then
echo "[MumukiDevstart::Classroom] MongoDB server not running. Starting...."
mongod 2>&1 > /dev/null &
fi
echo "[MumukiDevstart::Classroom] Starting server...."
MUMUKI_DEV_IP=${1:-localhost}
MUMUKI_PLATFORM_DOMAIN=$MUMUKI_DEV_IP:3002 \
MUMUKI_ORGANIZATION_MAPPING=path \
MUMUKI_COOKIES_DOMAIN=$MUMUKI_DEV_IP \
SECRET_KEY_BASE=aReallyStrongKeyForDevelopment \
bundle exec rails s -p 3002 -b $MUMUKI_DEV_IP