rom-rb / rom

Data mapping and persistence toolkit for Ruby
https://rom-rb.org
MIT License
2.08k stars 161 forks source link

Add docker development environment #509

Closed waiting-for-dev closed 5 years ago

waiting-for-dev commented 5 years ago

I created this PR while preparing my environment to contribute in another PR.

This sets up a docker environment ready to start contributing to rom. I think that for a library like this one, which has system dependencies (sqlite dev tools), uses external services (postgres) and expects a given configuration (database url) it can be quite helpful. With it, you can just clone rom repo and do:

  1. docker-compose up -d
  2. docker-compose exec app bundle exec rake spec

I had to modify spec helper files in order to allow them to take database uri from the docker defined environment, but local development should behave as before.

If you find it useful and you want maybe I could add another commit modifying the README or CONTRIBUTING files?