nixpkgs/pkgs/applications/version-management/gitlab/remove-hardcoded-locations.patch

119 lines
4.4 KiB
Diff
Raw Normal View History

diff --git a/config/environments/production.rb b/config/environments/production.rb
2015-10-21 17:48:56 +00:00
index 3316ece..c34dec0 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
2015-10-21 17:48:56 +00:00
@@ -67,10 +67,10 @@ Gitlab::Application.configure do
config.action_mailer.delivery_method = :sendmail
# Defaults to:
- # # config.action_mailer.sendmail_settings = {
- # # location: '/usr/sbin/sendmail',
- # # arguments: '-i -t'
- # # }
+ config.action_mailer.sendmail_settings = {
+ location: '/var/setuid-wrappers/sendmail',
+ arguments: '-i -t'
+ }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
2015-10-21 17:48:56 +00:00
index 15930fc..bdb423c 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
2015-10-21 17:48:56 +00:00
@@ -29,8 +29,8 @@ production: &base
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
- host: localhost
- port: 80 # Set to 443 if using HTTPS, see installation.md#using-https for additional HTTPS configuration details
+ host: <%= ENV['GITLAB_HOST'] || 'localhost' %>
+ port: <%= ENV['GITLAB_PORT'] || 80 %>
https: false # Set to true if using HTTPS, see installation.md#using-https for additional HTTPS configuration details
# Uncommment this line below if your ssh host is different from HTTP/HTTPS one
2015-10-21 17:48:56 +00:00
@@ -43,7 +43,7 @@ production: &base
# relative_url_root: /gitlab
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
- # user: git
+ user: gitlab
2015-10-21 17:48:56 +00:00
## Date & Time settings
# Uncomment and customize if you want to change the default time zone of GitLab application.
@@ -54,7 +54,7 @@ production: &base
# Uncomment and set to false if you need to disable email sending from GitLab (default: true)
# email_enabled: true
# Email address used in the "From" field in mails sent by GitLab
- email_from: example@example.com
+ email_from: <%= ENV['GITLAB_EMAIL_FROM'] %>
2015-10-21 17:48:56 +00:00
email_display_name: GitLab
email_reply_to: noreply@example.com
2015-10-21 17:48:56 +00:00
@@ -298,12 +298,12 @@ production: &base
# GitLab Satellites
satellites:
# Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
- path: /home/git/gitlab-satellites/
+ path: <%= ENV['GITLAB_SATELLITES_PATH'] %>
timeout: 30
## Backup settings
backup:
- path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
+ path: <%= ENV['GITLAB_BACKUP_PATH'] %>
2015-10-21 17:48:56 +00:00
# archive_permissions: 0640 # Permissions for the resulting backup.tar file (default: 0600)
# keep_time: 604800 # default: 0 (forever) (in seconds)
2015-10-21 17:48:56 +00:00
# pg_schema: public # default: nil, it means that all schemas will be backed up
@@ -322,15 +322,15 @@ production: &base
## GitLab Shell settings
gitlab_shell:
- path: /home/git/gitlab-shell/
+ path: <%= ENV['GITLAB_SHELL_PATH'] %>
# REPOS_PATH MUST NOT BE A SYMLINK!!!
- repos_path: /home/git/repositories/
- hooks_path: /home/git/gitlab-shell/hooks/
+ repos_path: <%= ENV['GITLAB_REPOSITORIES_PATH'] %>
+ hooks_path: <%= ENV['GITLAB_SHELL_HOOKS_PATH'] %>
2015-10-21 17:48:56 +00:00
# File that contains the secret key for verifying access for gitlab-shell.
# Default is '.gitlab_shell_secret' relative to Rails.root (i.e. root of the GitLab app).
- # secret_file: /home/git/gitlab/.gitlab_shell_secret
+ secret_file: <%= ENV['GITLAB_SHELL_SECRET_PATH'] %>
# Git over HTTP
upload_pack: true
2015-10-21 17:48:56 +00:00
@@ -343,7 +343,7 @@ production: &base
# CAUTION!
# Use the default values unless you really know what you are doing
git:
- bin_path: /usr/bin/git
+ bin_path: git
# The next value is the maximum memory size grit can use
# Given in number of bytes per git object (e.g. a commit)
# This value can be increased if you have very large commits
2015-10-21 17:48:56 +00:00
@@ -388,7 +388,7 @@ test:
gravatar:
enabled: true
gitlab:
- host: localhost
+ host: <%= ENV['GITLAB_HOST'] %>
port: 80
# When you run tests we clone and setup gitlab-shell
diff --git a/lib/gitlab/app_logger.rb b/lib/gitlab/app_logger.rb
2015-10-21 17:48:56 +00:00
index dddcb25..d61f10a 100644
--- a/lib/gitlab/app_logger.rb
+++ b/lib/gitlab/app_logger.rb
@@ -1,7 +1,7 @@
module Gitlab
class AppLogger < Gitlab::Logger
2015-10-21 17:48:56 +00:00
def self.file_name_noext
- 'application'
+ ENV["GITLAB_APPLICATION_LOG_PATH"]
end
def format_message(severity, timestamp, progname, msg)