Docker must be installed in order to run the project locally. To start the project:
docker-compose up -dThe initial build can take a moment. Once it's all running:
docker-compose exec web bin/rake db:create
docker-compose exec web bin/rake db:migrateThat should get you up and running. You can run bin/console to access a rails console running in the web container.
We use a special docker entrypoint.sh that allows us to bypass having to rebuild images when changing gems, it runs on container boot, so after changing your Gemfile, run the following:
docker-compose restart web workerThe same applies as well if you change any code in initializers (as per normal Rails usage).
docker-compose exec web bin/rake db:migratedocker-compose exec spec bin/rspec
# Running a specific test
docker-compose exec spec bin/rspec spec/requests/graphql/mutations/create_item_spec.rbLinting does not have to happen in Docker, since it is just a file analysis tool.
bin/rubocop
# But you can run it in docker if you don't have ruby installed locally
docker-compose exec web bin/rubocop