You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB
Plaintext

# <%= app_name %>
This is a Rails <%= Rails::VERSION::MAJOR %> app.
## Documentation
This README describes the purpose of this repository and how to set up a development environment.
## Prerequisites
This project requires:
* Ruby <%= RUBY_VERSION %>, preferably managed using [asdf][https://asdf-vm.com/]
* [Docker](https://docs.docker.com/get-docker/) must be installed and running
* Docker Compose must be installed (within docker or not)
If you need help setting up a Ruby development environment, check out this [Ruby Devstation OS X Setup script](https://git.imfiny.com/OpenSource/setup).
## Getting started
### bin/setup
Run the `bin/setup` script. This script will:
* Check you have the required Ruby version
* Install dependencies using Bundler and Yarn
* Create a `.env.development` file
* Create, migrate, and seed the database
### Run it!
1. Start Redis and PostgreSQL databases as containers `docker-compose up -d` (the template script will start them already the first time, you will probably need to do it again after a reboot)
2. Run `bin/rake` to run all tests and lint checks.
3. Start the app with `bin/rails s`
Access the app at <http://localhost:3000/>.
## Deployment
Ensure the following environment variables are set in the deployment environment:
* `DATABASE_URL`
* `RACK_ENV`
* `RAILS_ENV`
* `REDIS_URL`
* `SECRET_KEY_BASE`
Optionally:
* `BASIC_AUTH_PASSWORD`
* `BASIC_AUTH_USERNAME`
* `POSTMARK_API_KEY`
* `RAILS_FORCE_SSL`
* `RAILS_HOSTNAME`
* `RAILS_LOG_TO_STDOUT`
* `RAILS_MAX_THREADS`
* `RAILS_SERVE_STATIC_FILES`
* `SIDEKIQ_CONCURRENCY`
* `SIDEKIQ_WEB_PASSWORD`
* `SIDEKIQ_WEB_USERNAME`
* `WEB_CONCURRENCY`
[rbenv]:https://github.com/sstephenson/rbenv
[Homebrew]:http://brew.sh