Dockerizing a Ruby on Rails app with a PostgreSQL Database

Posted by Daniel Wachtel in Rails, updated on 06 September, 2020


These are the configurations I use to deploy a Rails 6 app. Note that this is a small hobby app so I'm using docker-compose to deploy it, for more serious apps you'd want to use docker swarm or kubernetes. If you don't have a server ready or docker and docker-compose installed on your local dev machine then have a read through this blog post first.

For this build I'm not going to dockerize NGINX as I have it installed on the server.

Create a Dockerfile

Step one is to create a Dockerfile in the root directory of your project. For this build I'll be using...

Read more