- Install docker
- Run all external services in the background with
docker-compose up -d
- Install rvm to manage your Ruby binaries
- Run
rvm install "ruby-2.5.0"to get the newest version of Ruby - Run
bundle installto install all gems - Run
rails db:setup db:seedto create the database and set up tables with seed data - Run
rails sto start the development server
You can examine the database with psql -h 0.0.0.0 -U postgres or by running rails dbconsole. Emails can be sent to smtp://localhost:1025 and read at http://localhost:1080.
-
Set the following environment variables:
Name Explanation PORT The port frontend listens on DATABASE_URL URL for the backend database server SENDGRID_USERNAME Username for SMTP server SENDGRID_PASSWORD Password for SMTP server FRONTEND_HOSTNAME The host where the backend can find the frontend BACKEND_HOSTNAME The host where the frontend can find the backend SENTRY_DSN (optional) DSN for Sentry integration -
Run
rails s -e productionto start the rails server in production mode -
You can now run requests against
localhost:5000
- Tests can be run in watch mode with the
guardcommand
- Tests can be run with
rspec
- Run
./init_hooksin the root folder to set up pre-commit and commit-message hooks
- Lints and autocorrects ruby code
- IntelliSense for ruby
- NB! First you must do
gem install solargraph