Dockerizing an existing #rails-Postgresql app with #docker compose
▻https://hackernoon.com/dockerizing-an-existing-rails-postgresql-app-with-docker-compose-a30a7e1
A quickstart to dockerizing your existing Rails-Postgresql application with Docker composeDockerfiles — Define the projectCreate Dockerfile in the app’s root directory, the project is defined by adding the dependencies to the Dockerfile.FROM #ruby:2.5.3RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejsRUN mkdir /myappWORKDIR /myappCOPY Gemfile /myapp/GemfileCOPY Gemfile.lock /myapp/Gemfile.lockRUN bundle installCOPY . /myappMake sure add the specific version of ruby that your application usesDocker-compose — Build the projectNow, create docker-compose.yml file in the root directory. This file does the magic of building your app from the current directory and running the pre-built postgresql image with the web appversion: ’3’services: db: image: (...)