gitlab: Make memory limits configurable

This patch adds two new variables to the gitlab playbook, making the
memory limits of the container configurable and this way easier to
adjust to one's needs.
This commit is contained in:
Sheogorath 2021-02-13 16:47:30 +01:00 committed by saibotk
parent 7053b37b2a
commit 88195836b7
Signed by: saibotk
GPG key ID: 67585F0065E261D5
2 changed files with 9 additions and 2 deletions

View file

@ -42,6 +42,13 @@ gitlab_version: 13.8.4-ce.0
# The port you want Gitlab to listen on for SSH connections
gitlab_ssh_port: 22
# The memory limits for the GitLab container
#
# Notice the gitlab_memoryswap_limit must be equal
# or higher than the gitlab_memory_limit
gitlab_memory_limit: "4096mb"
gitlab_memoryswap_limit: "4352mb"
# Email/SMTP settings
gitlab_smtp_address: smtp.example.com
gitlab_smtp_port: 465

View file

@ -22,8 +22,8 @@ services:
web:
image: docker.io/gitlab/gitlab-ce:{{ gitlab_version }}
hostname: '{{ gitlab_domain }}'
mem_limit: 4500mb
memswap_limit: 5000mb
mem_limit: {{ gitlab_memory_limit }}
memswap_limit: {{ gitlab_memoryswap_limit }}
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://{{ gitlab_domain }}'