![postgres app rails postgres app rails](https://i.stack.imgur.com/cSt6J.png)
![postgres app rails postgres app rails](https://onebitcode.com/wp-content/uploads/2018/03/deploy-rails-com-capistrano-na-digital-ocean.png)
#Postgres app rails install#
RUN apt-get update -qq & apt-get install -y nodejs postgresql-client I will start with the rails app image by creating a Dockerfile: FROM ruby:2.4 I created a new directory on my local machine called quickstart. The first step is to have the basic rails app running with database. There is an official tutorial here, this note is mainly following along, but also add sidekiq and add more explanations. What I want to achieve is to have a docker application with rails and postgresql running and talking to each other, and add redis and sidekiq. Docker compose seems to be the perfect tool for this scenario. So what will be convenient is to be able to start up the local dev environment quickly in a separate environment. I mentioned docker compose to manage multiple container docker applications in this post, and now I am going to use it to solve a problem I have: recently I’ve been trying to build different small experimental rails apps, those lifespan of those small apps are short, and I usually start and continue those apps on different machines, every time I start a new app in a new machine I need to set up the app, set up the database the their connection, and sometimes it might affect other parts of the setup for long term projects. User Docker Compose for A Rails App with Postgres and Sidekiq