Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
4f1e0014
Commit
4f1e0014
authored
May 14, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify registry configuration
parent
0a9979d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
36 deletions
+6
-36
config/gitlab.yml.example
config/gitlab.yml.example
+1
-3
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+5
-33
No files found.
config/gitlab.yml.example
View file @
4f1e0014
...
...
@@ -179,9 +179,7 @@ production: &base
registry:
# enabled: true
# host: localhost
# port: 5000
# https: false
# internal_host: localhost
# api_url: http://localhost:5000/
# key: config/registry.key
# issuer: omnibus-certificate
...
...
config/initializers/1_settings.rb
View file @
4f1e0014
...
...
@@ -27,30 +27,6 @@ class Settings < Settingslogic
].
join
(
''
)
end
def
build_registry_api_url
if
registry
.
port
.
to_i
==
(
registry
.
https
?
443
:
80
)
custom_port
=
nil
else
custom_port
=
":
#{
registry
.
port
}
"
end
[
registry
.
protocol
,
"://"
,
registry
.
internal_host
,
custom_port
].
join
(
''
)
end
def
build_registry_host_with_port
if
registry
.
port
.
to_i
==
(
registry
.
https
?
443
:
80
)
custom_port
=
nil
else
custom_port
=
":
#{
registry
.
port
}
"
end
[
registry
.
host
,
custom_port
].
join
(
''
)
end
def
build_gitlab_shell_ssh_path_prefix
user_host
=
"
#{
gitlab_shell
.
ssh_user
}
@
#{
gitlab_shell
.
ssh_host
}
"
...
...
@@ -271,15 +247,11 @@ Settings.artifacts['max_size'] ||= 100 # in megabytes
# Registry
#
Settings
[
'registry'
]
||=
Settingslogic
.
new
({})
Settings
.
registry
[
'enabled'
]
=
false
if
Settings
.
registry
[
'enabled'
].
nil?
Settings
.
registry
[
'host'
]
||=
"example.com"
Settings
.
registry
[
'internal_host'
]
||=
"localhost"
Settings
.
registry
[
'key'
]
||=
nil
Settings
.
registry
[
'https'
]
=
false
if
Settings
.
registry
[
'https'
].
nil?
Settings
.
registry
[
'port'
]
||=
Settings
.
registry
.
https
?
443
:
80
Settings
.
registry
[
'protocol'
]
||=
Settings
.
registry
.
https
?
"https"
:
"http"
Settings
.
registry
[
'api_url'
]
||=
Settings
.
send
(
:build_registry_api_url
)
Settings
.
registry
[
'host_port'
]
||=
Settings
.
send
(
:build_registry_host_with_port
)
Settings
.
registry
[
'enabled'
]
||=
false
Settings
.
registry
[
'host'
]
||=
"example.com"
Settings
.
registry
[
'api_url'
]
||=
"http://localhost:5000/"
Settings
.
registry
[
'key'
]
||=
nil
Settings
.
registry
[
'issuer'
]
||=
nil
#
# Git LFS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment