I would like to set up continuous deployment in Bitbucket Pipelines for the Ruby on Rails / PostgreSQL / Sidekiq project, but I'm struggling to figure out how it all fits together, and in particular how to get postgres to work inside the Docker image. I am very new to Docker and Pipelines.
In my Googling, Docker talks about using docker layout to create a package, so I will have a Postgres container and a Sideqik container, and then bind them to the application container. But I'm not sure what the difference is between a package and an image, and if Bitbucket Pipelines supports packages. In the end, I want to set up intermediate deployment on Heroku, but now just getting the rspec spec to work in Pipelines would be fine.
Is there an existing public image that has already configured Ruby + PostgreSQL that I can use? If not, where to start? My current Dockerfile looks like this:
FROM postgres:9.4 FROM ruby:2.3.1-onbuild RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs postgresql-client
Then I run docker build . and docker run -it my-image /bin/bash and the following commands:
root@a84ad0e7c16b :/usr/src/app
source share