diff --git a/.env.sample b/.env.sample index 5032b86..812940f 100644 --- a/.env.sample +++ b/.env.sample @@ -1,3 +1,4 @@ +export CLARIFAI_API_KEY=[api_key] export GITHUB_KEY=[key] export GITHUB_SECRET=[secret] export GITHUB_ORG=[team_id] diff --git a/README.md b/README.md index e6c22e3..b50bcc0 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,17 @@ A simple DragonFly powered image storage application. * Ruby 2.5.1 * PostgreSQL 9+ * Imagemagick + +## Getting started + +Bootstrap the project: + +```sh +$ bin/setup +``` + +Run the server: + +```sh +$ foreman start +``` diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000..33257f0 --- /dev/null +++ b/bin/setup @@ -0,0 +1,20 @@ +#!/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 + +# 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