Helper gem to create docker containers on a CI server.
Add the following line to the development group in your Gemfile:
gem 'docker-deploy', require: false, git: 'https://github.com/ad2games/docker-deploy'
- Runs bundler-audit
- Checks that
puma
andrails_migrate_mutex
are installed - Creates a Dockerfile using our Docker-Rails Baseimage
- Downloads GeoIP Database (only when
GEOIP_LICENSE_KEY
ENV is set) - Pushes container to private Docker Hub repository tagged with the CI build number
To achieve faster builds, it pulls the previously pushed image from Docker Hub. If there was
no change in gem versions, the whole bundle install
step can now be skipped,
resulting way faster builds.
This gems contains a .dockerignore file to exclude everything not needed for production deployment. That includes the git repo, spec files and artifacts left over from the CI test run.
Add the following line to the deployment step of the CI config:
bundle exec rake -r docker-deploy docker:deploy
Make sure to set DOCKER_PASSWORD
in the CI ENV.
MIT, see LICENSE.txt
Feel free to fork and submit pull requests!