summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 12:07:43 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 12:07:43 +0000
commit39fa7d1eeb2dba52f0601128f3ac91f57d19866e (patch)
treeda042d34ff762dd1957e51666a34202295a081b9 /config
parent6ac4a6713ed3196af899011f7e18658e16ebaac0 (diff)
downloadgitlab-ce-39fa7d1eeb2dba52f0601128f3ac91f57d19866e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example31
-rw-r--r--config/initializers/1_settings.rb8
-rw-r--r--config/initializers/rails_host_authorization.rb5
3 files changed, 44 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index eb41e4ac423..b66389b1a6f 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -320,6 +320,24 @@ production: &base
# aws_signature_version: 4 # For creation of signed URLs. Set to 2 if provider does not support v4.
# path_style: true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
+ ## Terraform state
+ terraform_state:
+ enabled: true
+ # The location where Terraform state files are stored (default: shared/terraform_state).
+ # storage_path: shared/terraform_state
+ object_store:
+ enabled: false
+ remote_directory: terraform_state # The bucket name
+ connection:
+ provider: AWS
+ aws_access_key_id: AWS_ACCESS_KEY_ID
+ aws_secret_access_key: AWS_SECRET_ACCESS_KEY
+ region: us-east-1
+ # host: 'localhost' # default: s3.amazonaws.com
+ # endpoint: 'http://127.0.0.1:9000' # default: nil
+ # aws_signature_version: 4 # For creation of signed URLs. Set to 2 if provider does not support v4.
+ # path_style: true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
+
## GitLab Pages
pages:
enabled: false
@@ -1193,6 +1211,19 @@ test:
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
region: us-east-1
+
+ terraform_state:
+ enabled: true
+ storage_path: tmp/tests/terraform_state
+ object_store:
+ enabled: false
+ remote_directory: terraform_state
+ connection:
+ provider: AWS # Only AWS supported at the moment
+ aws_access_key_id: AWS_ACCESS_KEY_ID
+ aws_secret_access_key: AWS_SECRET_ACCESS_KEY
+ region: us-east-1
+
gitlab:
host: localhost
port: 80
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 79bfcfd79e1..f31762d9ac6 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -370,6 +370,14 @@ Gitlab.ee do
end
#
+# Terraform state
+#
+Settings['terraform_state'] ||= Settingslogic.new({})
+Settings.terraform_state['enabled'] = true if Settings.terraform_state['enabled'].nil?
+Settings.terraform_state['storage_path'] = Settings.absolute(Settings.terraform_state['storage_path'] || File.join(Settings.shared['path'], "terraform_state"))
+Settings.terraform_state['object_store'] = ObjectStoreSettings.parse(Settings.terraform_state['object_store'])
+
+#
# Mattermost
#
Settings['mattermost'] ||= Settingslogic.new({})
diff --git a/config/initializers/rails_host_authorization.rb b/config/initializers/rails_host_authorization.rb
index 3be2de47812..6cca39ea95b 100644
--- a/config/initializers/rails_host_authorization.rb
+++ b/config/initializers/rails_host_authorization.rb
@@ -4,4 +4,9 @@
if Rails.env.development?
Rails.application.config.hosts += [Gitlab.config.gitlab.host, 'unix']
+
+ if ENV['RAILS_HOSTS']
+ additional_hosts = ENV['RAILS_HOSTS'].split(',').select(&:presence)
+ Rails.application.config.hosts += additional_hosts
+ end
end