Created on Ubuntu 20.04
This is a minimal example for a Dockerized Rails project with the following technologies
.env
from .env.template
. Configure .env.docker
but keep the DATABASE_HOST as db
.config-docker/init.sql
to be consistent with .env$ docker-compose up
(-d to begin build in background) This can take a few minutes$ docker-compose exec web bundle exec rake db:setup db:migrate
to initialize your virtual database.Rails version: 6.0.3.3
and Ruby version: ruby 2.7.2p137
These pages were helpful guides on getting setup. Thank you to the respective authors.