Modify the binstubs to run things in docker

This commit is contained in:
Matt Rogers 2018-04-27 09:13:35 -05:00
parent 99ef4af3e5
commit faceaac874
7 changed files with 35 additions and 0 deletions

View file

@ -1,3 +1,6 @@
#!/usr/bin/env ruby
if ENV["RAILS_ENV"] != "production"
exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env")
end
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')

View file

@ -1,4 +1,7 @@
#!/usr/bin/env ruby
if ENV["RAILS_ENV"] != "production"
exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env")
end
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError

View file

@ -1,4 +1,8 @@
#!/usr/bin/env ruby
if ENV["RAILS_ENV"] != "production"
exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env")
end
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'

View file

@ -1,4 +1,7 @@
#!/usr/bin/env ruby
if ENV["RAILS_ENV"] != "production"
exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env")
end
require_relative '../config/boot'
require 'rake'
Rake.application.run

View file

@ -1,4 +1,7 @@
#!/usr/bin/env ruby
if ENV["RAILS_ENV"] != "production"
exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env")
end
require 'pathname'
# path to your application root.

View file

@ -1,4 +1,7 @@
#!/usr/bin/env ruby
if ENV["RAILS_ENV"] != "production"
exec("#{__dir__}/../script/docker-environment", $PROGRAM_NAME, *ARGV) unless File.exist?("/etc/app-env")
end
# This file loads spring without using Bundler, in order to be fast
# It gets overwritten when you run the `spring binstub` command