allow proxy env vars (#115)

allow proxy env vars (#115)

diff --git a/app/controllers/docker_manager/admin_controller.rb b/app/controllers/docker_manager/admin_controller.rb
index ad240d0..d6b5047 100644
--- a/app/controllers/docker_manager/admin_controller.rb
+++ b/app/controllers/docker_manager/admin_controller.rb
@@ -91,13 +91,17 @@ module DockerManager
       raise Discourse::NotFound unless repo.present?
       script_path = File.expand_path(File.join(__dir__, '../../../scripts/docker_manager_upgrade.rb'))
 
-      pid = spawn(
-        {
+      env_vars = {
           'UPGRADE_USER_ID' => current_user.id.to_s,
           'UPGRADE_PATH' => params[:path].to_s,
           'UPGRADE_REPO_VERSION' => repo_version(repo).to_s,
           'RAILS_ENV' => Rails.env
-        },
+      }
+      ["http_proxy","https_proxy","no_proxy","HTTP_PROXY","HTTPS_PROXY","NO_PROXY"].each do |p|
+        env_vars[p] = ENV[p] if ! ENV[p].nil?
+      end
+      pid = spawn(
+        env_vars,
         "bundle exec rails runner #{script_path}"
       )
       Process.detach(pid)
diff --git a/lib/docker_manager/upgrader.rb b/lib/docker_manager/upgrader.rb
index e2853eb..e9d0f6e 100644
--- a/lib/docker_manager/upgrader.rb
+++ b/lib/docker_manager/upgrader.rb
@@ -168,6 +168,12 @@ class DockerManager::Upgrader
       PATH
       COMPRESS_BROTLI
       FORCE_S3_UPLOADS
+      HTTP_PROXY
+      HTTPS_PROXY
+      NO_PROXY
+      http_proxy
+      https_proxy
+      no_proxy
     }
 
     clear_env = Hash[*ENV.map { |k, v| [k, nil] }

GitHub sha: 745e98161b0429d7f881351849cdf858ae4f7437

This commit appears in #115 which was approved by eviltrout. It was merged by eviltrout.