Add some rake tasks for Docker

This commit is contained in:
Hakan Ensari 2018-03-17 14:39:42 +00:00
parent c655b16cb8
commit 9d364565f6

17
lib/tasks/docker.rake Normal file
View File

@ -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