My Stuff

Getting Rails 3.0 up and running on docker and dokku

As a fun exercise, I would try and get some of my older abandoned Ruby on Rails projects up and running inside a docker container. The first project I tackled was called “Lotto in my Pocket”. It’s a Rails 3.0 project which I had last touched 6 years ago.  My goal was to get everything setup inside docker for development and would deploy it via CircleCI onto my dokku instance.

Fortunately, I had a Dockerfile and docker-compose.yml files I could start with, which is detailed in another blog post of mine.

Things I managed to do:

  • I made a change to the Dockerfile to use “FROM ruby:1.9.3
  • In the docker-compose.yml I removed the spring section.
  • kept one controller spec and I removed all other empty spec files
  • removed gems that were not being used.
  • updated nokogiri gem so it would compile
  • updated rails gem
  • updated omniauth and set all logins to use developer authentication
  • created the app on dokku
  • setup CircleCI to deploy the app

Eventually, I managed to get the app up and running. You can find it here http://lottoinmypocket.speelman.co.za/ and the code here https://github.com/grantspeelman/lottoinmypocket

I really feel I am starting to get the hang of this docker and dokku stuff 🙂

 

Leave a comment