Skip to content

Development setup

Julia Morelli edited this page May 12, 2020 · 1 revision

This project has been developed with Ruby on Rails, Postgres and ActiveAdmin. The main use is to be the backend for an app used with limited connectivity, and handling sensitive data that requires obfuscation, so those are the main concerns in the code.

Development environment

  • Install Docker & docker-compose
  • Start database & webserver:
docker-compose up
  • Run seeds:
docker-compose run --rm app bundle exec rails db:seed

Open http://localhost:3000/admin

Warning

Bear in mind, once cloned & built, the project will be automatically lifted whenever you restart docker (or, for that matter, your computer) and thus it will occupy your :3000 port. We recommend that whenever you're no longer contributing, you remove the repo from your computer to avoid port problems with other projects.

Useful commands

# Open a terminal in the web server directory
docker-compose run app bash

# Run linter and autofixes if needed
docker-compose run app bundle exec rubocop -a

# Run tests
docker-compose run --rm app bundle exec rspec

# Run seeds
docker-compose run --rm app bundle exec rails db:seed
Clone this wiki locally