1
0
mirror of https://github.com/danbee/my-images synced 2025-03-04 08:49:05 +00:00

Add setup script and improve readme

This commit is contained in:
Daniel Barber 2018-08-31 09:48:24 -04:00
parent e13dfe89fc
commit 9201b3c385
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
3 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,4 @@
export CLARIFAI_API_KEY=[api_key]
export GITHUB_KEY=[key]
export GITHUB_SECRET=[secret]
export GITHUB_ORG=[team_id]

View File

@ -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
```

20
bin/setup Executable file
View File

@ -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