From 7648e7ebf34ab5a027e119b82df79d0830c32b4f Mon Sep 17 00:00:00 2001 From: "Steven R. Baker" Date: Mon, 13 May 2019 15:55:59 +0200 Subject: [PATCH] Don't use docker if the file `.skip-docker` exists in project. --- .gitignore | 1 + bin/bundle | 2 +- bin/rails | 2 +- bin/rake | 2 +- bin/spring | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 43a6ebc4..a6ef4ba1 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ db/data.yml nbproject rerun.txt tags +.skip-docker diff --git a/bin/bundle b/bin/bundle index dcb735a4..d63e647b 100755 --- a/bin/bundle +++ b/bin/bundle @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -if ENV["RAILS_ENV"] != "production" +unless ENV["RAILS_ENV"] == "production" || File.exist?("#{__dir__}/../.skip-docker") exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env") end ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) diff --git a/bin/rails b/bin/rails index 41582adf..e8199c68 100755 --- a/bin/rails +++ b/bin/rails @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -if ENV["RAILS_ENV"] != "production" +unless ENV["RAILS_ENV"] == "production" || File.exist?("#{__dir__}/../.skip-docker") exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env") end diff --git a/bin/rake b/bin/rake index 36d60756..f0ccc9e2 100755 --- a/bin/rake +++ b/bin/rake @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -if ENV["RAILS_ENV"] != "production" +unless ENV["RAILS_ENV"] == "production" || File.exist?("#{__dir__}/../.skip-docker") exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env") end require_relative '../config/boot' diff --git a/bin/spring b/bin/spring index 3d225a65..1e047727 100755 --- a/bin/spring +++ b/bin/spring @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -if ENV["RAILS_ENV"] != "production" +unless ENV["RAILS_ENV"] == "production" || File.exist?("#{__dir__}/../.skip-docker") exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env") end