mirror of
https://github.com/danbee/my-images
synced 2025-03-04 08:49:05 +00:00
24 lines
597 B
Bash
Executable File
24 lines
597 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
# Set up Rails app. Run this script immediately after cloning the codebase.
|
|
# https://github.com/thoughtbot/guides/tree/master/protocol
|
|
|
|
# Exit if any subcommand fails
|
|
set -e
|
|
|
|
# Set up Ruby dependencies via Bundler
|
|
gem list bundler --installed > /dev/null || gem install bundler
|
|
gem list foreman --installed > /dev/null || gem install foreman
|
|
bundle install
|
|
|
|
# Install Javascript dependencies
|
|
yarn install
|
|
|
|
# Set up configurable environment variables
|
|
if [ ! -f .env ]; then
|
|
cp .env.sample .env
|
|
fi
|
|
|
|
# Set up database and add any development seed data
|
|
bundle exec rake db:setup
|