Docker + Rails + Postgres
This is based on the offical Docker docs workflow, updated to support the early 2020 Docker-lib/Postgres breaking changes.
docker-compose up
The app will be running at http://localhost:3000/
If you make changes to the Gemfile or the Compose file to try out some different configurations, you need to rebuild. Some changes require only docker-compose up --build, but a full rebuild requires a re-run of docker-compose run web bundle install to sync changes in the Gemfile.lock to the host, followed by docker-compose up --build.
To run rails commands:
docker-compose run web rails generate controller home index
To create the DB (if needed):
docker-compose run web rake db:create
See here