gitlab: Add options for port and entrypoint to registry config
This patch enables users to customize the entrypoint and port that is shown for external access (only supplied so gitlab can still show valid registry links).
This commit is contained in:
parent
19eb9e1196
commit
47f4de58d7
2 changed files with 6 additions and 4 deletions
|
@ -102,6 +102,8 @@ gitlab_csp:
|
|||
# Gitlab docker registry settings
|
||||
gitlab_registry:
|
||||
enabled: false
|
||||
# external_port: 5050 # Defines the port that is appended to the registry domain used by gitlab.
|
||||
# traefik_entrypoint: "websecure" # Defines the entrypoint that traefik should use for the registry. Can be useful to use another port while still using the certificate of the domain.
|
||||
|
||||
# Gitlab telegraf configuration, allows to configure a monitoring setup for Gitlab
|
||||
gitlab_telegraf:
|
||||
|
|
|
@ -115,8 +115,8 @@ services:
|
|||
# Gitlab registry
|
||||
gitlab_rails['registry_enabled'] = true
|
||||
gitlab_rails['registry_host'] = "{{ gitlab_registry_domain }}"
|
||||
registry_external_url "https://{{ gitlab_registry_domain }}"
|
||||
registry_nginx['listen_port'] = 5050
|
||||
registry_external_url "https://{{ gitlab_registry_domain }}{% if gitlab_registry.external_port is defined %}:{{ gitlab_registry.external_port }}{% endif %}"
|
||||
registry_nginx['listen_port'] = 5040
|
||||
registry_nginx['listen_https'] = false
|
||||
{% endif %}
|
||||
|
||||
|
@ -196,12 +196,12 @@ services:
|
|||
|
||||
{% if gitlab_registry.enabled %}
|
||||
- "traefik.http.routers.gitlab-registry.rule=Host(`{{ gitlab_registry_domain }}`) && PathPrefix(`/`)"
|
||||
- "traefik.http.routers.gitlab-registry.entrypoints=websecure"
|
||||
- "traefik.http.routers.gitlab-registry.entrypoints={{ gitlab_registry.traefik_entrypoint | default('websecure') }}"
|
||||
- "traefik.http.routers.gitlab-registry.tls=true"
|
||||
- "traefik.http.routers.gitlab-registry.tls.certresolver={{ gitlab_traefik_certresolver }}"
|
||||
- "traefik.http.routers.gitlab-registry.middlewares=gitlab,compress"
|
||||
- "traefik.http.routers.gitlab-registry.service=gitlab-registry"
|
||||
- "traefik.http.services.gitlab-registry.loadbalancer.server.port=5050"
|
||||
- "traefik.http.services.gitlab-registry.loadbalancer.server.port=5040"
|
||||
{% endif %}
|
||||
|
||||
- "traefik.http.middlewares.gitlab.headers.sslredirect=true"
|
||||
|
|
Loading…
Add table
Reference in a new issue