Below are links I had open while learning how to use docker-compose with Rails, and using Dokku for deployments.
Dockerize Rails
https://semaphoreci.com/community/tutorials/dockerizing-a-ruby-on-rails-application
https://thoughtbot.com/blog/rails-on-docker
https://www.linode.com/docs/applications/containers/docker-container-communication/
https://docs.docker.com/compose/rails/
Set up CI/CD
https://gist.github.com/lucaspiller/d5bf6ea1c06b4dbaad98f97372319324
https://gitlab.com/guided-explorations/containers/kaniko-docker-build/-/blob/master/.gitlab-ci.yml
https://docs.gitlab.com/ee/ci/docker/using_kaniko.html
Deploy
https://auth0.com/blog/hosting-applications-using-digitalocean-and-dokku/
http://dokku.viewdocs.io/dokku/getting-started/installation/
http://dokku.viewdocs.io/dokku/deployment/application-deployment/
http://dokku.viewdocs.io/dokku/getting-started/install/digitalocean/
https://blog.ssdnodes.com/blog/getting-started-docker-vps/
https://docs.docker.com/compose/production/
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04