From 9d364565f6450ed41aa3442d57a63ce878fe2848 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Sat, 17 Mar 2018 14:39:42 +0000 Subject: [PATCH] Add some rake tasks for Docker --- lib/tasks/docker.rake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/tasks/docker.rake diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake new file mode 100644 index 0000000..00c35b5 --- /dev/null +++ b/lib/tasks/docker.rake @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +namespace :docker do + namespace :development do + desc 'Build and start services in development' + task :start do + `docker-compose up -d` + end + end + + namespace :production do + desc 'Build or rebuild and start services in production' + task :start do + `docker-compose -f docker-compose.yml -f docker-compose.prod.yml pull && docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d` + end + end +end