This is the GitHub repository for the Central Oregon Community Organizations Active in Disaster (COAD) help service system. It connects people in need with resources made available by members of Community Organizations Active in Disaster.
Fork the repository:
https://github.com/beejjorgensen/cs362-coad-resources
And then clone it to your local development environment, eg:
git clone git@github.com:YOURFORK/cs362-coad-resources.git
This is a Rails application that uses SQLite in development and PostgreSQL in production.
Install the dependencies:
gem install bundler -v 2.4.22
bundle install
Get the rails symlink set up so you can run it:
rbenv rehash
The Rails DB expects some environment variables to be set up in order to
use. It will look for these in a .env
file.
Make a copy of the example .env
file:
cp .env.example .env
Then edit .env
and change the values appropriately. (Don't worry about
stuff from the ReCAPTCHA down.)
Next, set up the database:
rails db:setup
If you want, you can create some seed data in the database:
rails db:seed
Start the app:
rails server
This project uses RSpec for testing.
rspec
You can also run a specific directory of tests or file by supplying its name, like so:
spring rspec spec/path/to/file_spec.rb
This application uses heroku for deployment. Some useful commands to know can be found below.
Set up a heroku app to deploy to:
heroku git:remote -a coad-resources-staging
heroku git:remote -a coad-resources
Rename them staging and production:
git remote rename coad-resources-staging staging
git remote rename coad-resources production
Deploy to a heroku app:
git push staging
Migrate the rails database of a heroku app:
heroku run rails db:migrate --remote staging
Seed the rails database of a heroku app:
heroku run rails db:seed --remote staging
Set environment variables (see .env.example for expectations):
heroku config:set FOO=bar
PostgreSQL Email Server (Gmail) Recaptcha
© 2020 James Martinez, Ryder McDowell. All rights reserved.