320 lines
13 KiB
Diff
320 lines
13 KiB
Diff
|
commit 3e313894380af46476b8ef5859bcd653defba3c4
|
||
|
Author: Anatol Pomozov <anatol.pomozov@gmail.com>
|
||
|
Date: Tue May 26 00:01:38 2020 -0700
|
||
|
|
||
|
Patch config files with Arch Linux specific locations
|
||
|
|
||
|
Arch uses upstream's default config files as a base for its configs.
|
||
|
But directory structure at Arch is completely different from the default
|
||
|
one specified by gitlab project.
|
||
|
We used to have a lot of seds expressions to adjust the files but as
|
||
|
complexity of configs grew 'sed' makes it easy to miss a changed/added
|
||
|
option.
|
||
|
|
||
|
Track set of diffs as a patch. If upstream modifies config file then it
|
||
|
will cause a conflict that needs to be reviewed manually.
|
||
|
|
||
|
diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql
|
||
|
index ca1ff4db1b4..7c6dbbf0a12 100644
|
||
|
--- a/config/database.yml.postgresql
|
||
|
+++ b/config/database.yml.postgresql
|
||
|
@@ -5,7 +5,7 @@ production:
|
||
|
adapter: postgresql
|
||
|
encoding: unicode
|
||
|
database: gitlabhq_production
|
||
|
- username: git
|
||
|
+ username: gitlab
|
||
|
password: "secure password"
|
||
|
host: localhost
|
||
|
# load_balancing:
|
||
|
@@ -38,7 +38,7 @@ staging:
|
||
|
adapter: postgresql
|
||
|
encoding: unicode
|
||
|
database: gitlabhq_staging
|
||
|
- username: git
|
||
|
+ username: gitlab
|
||
|
password: "secure password"
|
||
|
host: localhost
|
||
|
|
||
|
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
|
||
|
index 57ece521301..c3725baccdf 100644
|
||
|
--- a/config/gitlab.yml.example
|
||
|
+++ b/config/gitlab.yml.example
|
||
|
@@ -85,7 +85,7 @@ production: &base
|
||
|
#- 2001:0db8::/32
|
||
|
|
||
|
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
|
||
|
- # user: git
|
||
|
+ user: gitlab
|
||
|
|
||
|
## Date & Time settings
|
||
|
# Uncomment and customize if you want to change the default time zone of GitLab application.
|
||
|
@@ -105,15 +105,15 @@ production: &base
|
||
|
# enabled: false
|
||
|
# S/MIME private key file in PEM format, unencrypted
|
||
|
# Default is '.gitlab_smime_key' relative to Rails.root (i.e. root of the GitLab app).
|
||
|
- # key_file: /home/git/gitlab/.gitlab_smime_key
|
||
|
+ # key_file: /var/lib/gitlab/.gitlab_smime_key
|
||
|
# S/MIME public certificate key in PEM format, will be attached to signed messages
|
||
|
# Default is '.gitlab_smime_cert' relative to Rails.root (i.e. root of the GitLab app).
|
||
|
- # cert_file: /home/git/gitlab/.gitlab_smime_cert
|
||
|
+ # cert_file: /var/lib/gitlab/.gitlab_smime_cert
|
||
|
# S/MIME extra CA public certificates in PEM format, will be attached to signed messages
|
||
|
# Optional
|
||
|
- # ca_certs_file: /home/git/gitlab/.gitlab_smime_ca_certs
|
||
|
+ # ca_certs_file: /var/lib/gitlab/.gitlab_smime_ca_certs
|
||
|
|
||
|
- # Email server smtp settings are in config/initializers/smtp_settings.rb.sample
|
||
|
+ # Email server smtp settings are in /etc/gitlab/smtp_settings.rb
|
||
|
|
||
|
# default_can_create_group: false # default: true
|
||
|
# username_changing_enabled: false # default: true - User can change their username/namespace
|
||
|
@@ -159,7 +159,7 @@ production: &base
|
||
|
## Repository downloads directory
|
||
|
# When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory.
|
||
|
# The default is 'shared/cache/archive/' relative to the root of the Rails app.
|
||
|
- # repository_downloads_path: shared/cache/archive/
|
||
|
+ repository_downloads_path: /var/lib/gitlab/shared/cache/archive
|
||
|
|
||
|
## Impersonation settings
|
||
|
impersonation_enabled: true
|
||
|
@@ -205,7 +205,7 @@ production: &base
|
||
|
# Since `mail_room` is run independently of Rails, an absolute path is preferred.
|
||
|
# The default is 'log/mail_room_json.log' relative to the root of the Rails app.
|
||
|
#
|
||
|
- # log_path: log/mail_room_json.log
|
||
|
+ log_path: /var/log/gitlab/mail_room_json.log
|
||
|
|
||
|
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
|
||
|
expunge_deleted: false
|
||
|
@@ -244,7 +244,7 @@ production: &base
|
||
|
artifacts:
|
||
|
enabled: true
|
||
|
# The location where build artifacts are stored (default: shared/artifacts).
|
||
|
- # path: shared/artifacts
|
||
|
+ path: /var/lib/gitlab/shared/artifacts
|
||
|
# object_store:
|
||
|
# enabled: false
|
||
|
# remote_directory: artifacts # The bucket name
|
||
|
@@ -264,7 +264,7 @@ production: &base
|
||
|
# be stored on disk, or in object storage
|
||
|
enabled: false
|
||
|
# The location where external diffs are stored (default: shared/lfs-external-diffs).
|
||
|
- # storage_path: shared/external-diffs
|
||
|
+ storage_path: /var/lib/gitlab/shared/external-diffs
|
||
|
# object_store:
|
||
|
# enabled: false
|
||
|
# remote_directory: external-diffs
|
||
|
@@ -280,7 +280,7 @@ production: &base
|
||
|
lfs:
|
||
|
enabled: true
|
||
|
# The location where LFS objects are stored (default: shared/lfs-objects).
|
||
|
- # storage_path: shared/lfs-objects
|
||
|
+ storage_path: /var/lib/gitlab/shared/lfs-objects
|
||
|
object_store:
|
||
|
enabled: false
|
||
|
remote_directory: lfs-objects # Bucket name
|
||
|
@@ -324,7 +324,7 @@ production: &base
|
||
|
enabled: true
|
||
|
dpkg_deb_path: /usr/bin/dpkg-deb
|
||
|
# The location where build packages are stored (default: shared/packages).
|
||
|
- # storage_path: shared/packages
|
||
|
+ storage_path: /var/lib/gitlab/shared/packages
|
||
|
object_store:
|
||
|
enabled: false
|
||
|
remote_directory: packages # The bucket name
|
||
|
@@ -345,7 +345,7 @@ production: &base
|
||
|
dependency_proxy:
|
||
|
enabled: true
|
||
|
# The location where build packages are stored (default: shared/dependency_proxy).
|
||
|
- # storage_path: shared/dependency_proxy
|
||
|
+ storage_path: /var/lib/gitlab/shared/dependency_proxy
|
||
|
object_store:
|
||
|
enabled: false
|
||
|
remote_directory: dependency_proxy # The bucket name
|
||
|
@@ -366,7 +366,7 @@ production: &base
|
||
|
terraform_state:
|
||
|
enabled: true
|
||
|
# The location where Terraform state files are stored (default: shared/terraform_state).
|
||
|
- # storage_path: shared/terraform_state
|
||
|
+ storage_path: /var/lib/gitlab/shared/terraform_state
|
||
|
object_store:
|
||
|
enabled: false
|
||
|
remote_directory: terraform # The bucket name
|
||
|
@@ -385,7 +385,7 @@ production: &base
|
||
|
enabled: false
|
||
|
access_control: false
|
||
|
# The location where pages are stored (default: shared/pages).
|
||
|
- # path: shared/pages
|
||
|
+ path: /var/lib/gitlab/shared/pages
|
||
|
|
||
|
# The domain under which the pages are served:
|
||
|
# http://group.example.com/project
|
||
|
@@ -399,7 +399,7 @@ production: &base
|
||
|
|
||
|
# File that contains the shared secret key for verifying access for gitlab-pages.
|
||
|
# Default is '.gitlab_pages_secret' relative to Rails.root (i.e. root of the GitLab app).
|
||
|
- # secret_file: /home/git/gitlab/.gitlab_pages_secret
|
||
|
+ secret_file: /var/lib/gitlab/.gitlab_pages_secret
|
||
|
object_store:
|
||
|
enabled: false
|
||
|
remote_directory: pages # The bucket name
|
||
|
@@ -557,7 +557,7 @@ production: &base
|
||
|
# port: 5005
|
||
|
# api_url: http://localhost:5000/ # internal address to the registry, will be used by GitLab to directly communicate with API
|
||
|
# key: config/registry.key
|
||
|
- # path: shared/registry
|
||
|
+ path: /var/lib/gitlab/shared/registry
|
||
|
# issuer: gitlab-issuer
|
||
|
# notification_secret: '' # only set it when you use Geo replication feature without built-in Registry
|
||
|
|
||
|
@@ -614,7 +614,7 @@ production: &base
|
||
|
# add_pusher: true
|
||
|
|
||
|
# The location where build traces are stored (default: builds/). Relative paths are relative to Rails.root
|
||
|
- # builds_path: builds/
|
||
|
+ builds_path: /var/lib/gitlab/builds
|
||
|
|
||
|
#
|
||
|
# 3. Auth settings
|
||
|
@@ -1064,7 +1064,7 @@ production: &base
|
||
|
|
||
|
# Shared file storage settings
|
||
|
shared:
|
||
|
- # path: /mnt/gitlab # Default: shared
|
||
|
+ path: /var/lib/gitlab/shared # Default: shared
|
||
|
|
||
|
# Encrypted Settings configuration
|
||
|
encrypted_settings:
|
||
|
@@ -1073,7 +1073,7 @@ production: &base
|
||
|
# Gitaly settings
|
||
|
gitaly:
|
||
|
# Path to the directory containing Gitaly client executables.
|
||
|
- client_path: /home/git/gitaly
|
||
|
+ client_path: /usr/bin
|
||
|
# Default Gitaly authentication token. Can be overridden per storage. Can
|
||
|
# be left blank when Gitaly is running locally on a Unix socket, which
|
||
|
# is the normal way to deploy Gitaly.
|
||
|
@@ -1091,13 +1091,13 @@ production: &base
|
||
|
# real path not the symlink.
|
||
|
storages: # You must have at least a `default` storage path.
|
||
|
default:
|
||
|
- path: /home/git/repositories/
|
||
|
- gitaly_address: unix:/home/git/gitlab/tmp/sockets/private/gitaly.socket # TCP connections are supported too (e.g. tcp://host:port). TLS connections are also supported using the system certificate pool (eg: tls://host:port).
|
||
|
+ path: /var/lib/gitlab/repositories
|
||
|
+ gitaly_address: unix:/run/gitlab/gitlab-gitaly.socket # TCP connections are supported too (e.g. tcp://host:port). TLS connections are also supported using the system certificate pool (eg: tls://host:port).
|
||
|
# gitaly_token: 'special token' # Optional: override global gitaly.token for this storage.
|
||
|
|
||
|
## Backup settings
|
||
|
backup:
|
||
|
- path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
|
||
|
+ path: "/var/lib/gitlab/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
|
||
|
# archive_permissions: 0640 # Permissions for the resulting backup.tar file (default: 0600)
|
||
|
# keep_time: 604800 # default: 0 (forever) (in seconds)
|
||
|
# pg_schema: public # default: nil, it means that all schemas will be backed up
|
||
|
@@ -1138,12 +1138,12 @@ production: &base
|
||
|
|
||
|
## GitLab Shell settings
|
||
|
gitlab_shell:
|
||
|
- path: /home/git/gitlab-shell/
|
||
|
- authorized_keys_file: /home/git/.ssh/authorized_keys
|
||
|
+ path: /usr/share/gitlab-shell
|
||
|
+ authorized_keys_file: /var/lib/gitlab/.ssh/authorized_keys
|
||
|
|
||
|
# 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: /var/lib/gitlab/.gitlab_shell_secret
|
||
|
|
||
|
# Git over HTTP
|
||
|
upload_pack: true
|
||
|
@@ -1158,13 +1158,13 @@ production: &base
|
||
|
workhorse:
|
||
|
# File that contains the secret key for verifying access for gitlab-workhorse.
|
||
|
# Default is '.gitlab_workhorse_secret' relative to Rails.root (i.e. root of the GitLab app).
|
||
|
- # secret_file: /home/git/gitlab/.gitlab_workhorse_secret
|
||
|
+ # secret_file: /var/lib/gitlab/.gitlab_workhorse_secret
|
||
|
|
||
|
gitlab_kas:
|
||
|
# enabled: true
|
||
|
# File that contains the secret key for verifying access for gitlab-kas.
|
||
|
# Default is '.gitlab_kas_secret' relative to Rails.root (i.e. root of the GitLab app).
|
||
|
- # secret_file: /home/git/gitlab/.gitlab_kas_secret
|
||
|
+ # secret_file: /var/lib/gitlab/.gitlab_kas_secret
|
||
|
|
||
|
# The URL to the external KAS API (used by the Kubernetes agents)
|
||
|
# external_url: wss://kas.example.com
|
||
|
@@ -1174,7 +1174,7 @@ production: &base
|
||
|
|
||
|
## GitLab Elasticsearch settings
|
||
|
elasticsearch:
|
||
|
- indexer_path: /home/git/gitlab-elasticsearch-indexer/
|
||
|
+ indexer_path: /var/lib/gitlab/elasticsearch-indexer
|
||
|
|
||
|
## Git settings
|
||
|
# CAUTION!
|
||
|
diff --git a/config/initializers/smtp_settings.rb.sample b/config/initializers/smtp_settings.rb.sample
|
||
|
index bd37080b1c8..f956e786071 100644
|
||
|
--- a/config/initializers/smtp_settings.rb.sample
|
||
|
+++ b/config/initializers/smtp_settings.rb.sample
|
||
|
@@ -1,13 +1,6 @@
|
||
|
-# To enable smtp email delivery for your GitLab instance do the following:
|
||
|
-# 1. Rename this file to smtp_settings.rb
|
||
|
-# 2. Edit settings inside this file
|
||
|
-# 3. Restart GitLab instance
|
||
|
-#
|
||
|
# For full list of options and their values see http://api.rubyonrails.org/classes/ActionMailer/Base.html
|
||
|
-#
|
||
|
-# If you change this file in a Merge Request, please also create a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
|
||
|
|
||
|
-if Rails.env.production?
|
||
|
+if false # To enable SMTP please replace 'false' with 'Rails.env.production?'
|
||
|
Rails.application.config.action_mailer.delivery_method = :smtp
|
||
|
|
||
|
ActionMailer::Base.delivery_method = :smtp
|
||
|
diff --git a/config/puma.rb.example b/config/puma.rb.example
|
||
|
index 9fc354a8fe8..e665079117e 100644
|
||
|
--- a/config/puma.rb.example
|
||
|
+++ b/config/puma.rb.example
|
||
|
@@ -5,11 +5,11 @@
|
||
|
# The default is "config.ru".
|
||
|
#
|
||
|
rackup 'config.ru'
|
||
|
-pidfile '/home/git/gitlab/tmp/pids/puma.pid'
|
||
|
-state_path '/home/git/gitlab/tmp/pids/puma.state'
|
||
|
+pidfile '/run/gitlab/puma.pid'
|
||
|
+state_path '/run/gitlab/puma.state'
|
||
|
|
||
|
-stdout_redirect '/home/git/gitlab/log/puma.stdout.log',
|
||
|
- '/home/git/gitlab/log/puma.stderr.log',
|
||
|
+stdout_redirect '/var/log/gitlab/puma.stdout.log',
|
||
|
+ '/var/log/gitlab/puma.stderr.log',
|
||
|
true
|
||
|
|
||
|
# Configure "min" to be the minimum number of threads to use to answer
|
||
|
@@ -31,12 +31,12 @@ queue_requests false
|
||
|
|
||
|
# Bind the server to "url". "tcp://", "unix://" and "ssl://" are the only
|
||
|
# accepted protocols.
|
||
|
-bind 'unix:///home/git/gitlab/tmp/sockets/gitlab.socket'
|
||
|
+bind 'unix:///run/gitlab/gitlab.socket'
|
||
|
|
||
|
workers 3
|
||
|
|
||
|
-require_relative "/home/git/gitlab/lib/gitlab/cluster/lifecycle_events"
|
||
|
-require_relative "/home/git/gitlab/lib/gitlab/cluster/puma_worker_killer_initializer"
|
||
|
+require_relative "/usr/share/gitlab/lib/gitlab/cluster/lifecycle_events"
|
||
|
+require_relative "/usr/share/gitlab/lib/gitlab/cluster/puma_worker_killer_initializer"
|
||
|
|
||
|
on_restart do
|
||
|
# Signal application hooks that we're about to restart
|
||
|
@@ -80,7 +80,7 @@ if defined?(nakayoshi_fork)
|
||
|
end
|
||
|
|
||
|
# Use json formatter
|
||
|
-require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter"
|
||
|
+require_relative "/usr/share/gitlab/lib/gitlab/puma_logging/json_formatter"
|
||
|
|
||
|
json_formatter = Gitlab::PumaLogging::JSONFormatter.new
|
||
|
log_formatter do |str|
|