gitlab: Add option to use a tmpfs instead of log bindmount
This patch will provide a new config option `gitlab_log_tmpfs` to configure the docker container to setup a tmpfs instead of the bindmount for the log directory of GitLab. This should solve all headache around logs clogging up the disk but might just trades it against memory problems. So far the test-run looks good, but time will tell if it is a sufficent solution.
This commit is contained in:
parent
9d0076036d
commit
7ea009d7a4
2 changed files with 12 additions and 0 deletions
|
@ -24,6 +24,9 @@ gitlab_data_location: "{{ gitlab_install_location }}/data"
|
||||||
gitlab_config_location: "{{ gitlab_install_location }}/config"
|
gitlab_config_location: "{{ gitlab_install_location }}/config"
|
||||||
gitlab_log_location: "{{ gitlab_install_location }}/log"
|
gitlab_log_location: "{{ gitlab_install_location }}/log"
|
||||||
|
|
||||||
|
# Put GitLab's logs in a tempfs instead to save headache with diskspace
|
||||||
|
gitlab_log_tmpfs: false
|
||||||
|
|
||||||
# Set the certresolver to your desired traefik certresolver.
|
# Set the certresolver to your desired traefik certresolver.
|
||||||
# Note: This is `letsencrypt_cf` by default for backwards compatibility, you might want to use `letsencrypt_http` instead, depending on your setup
|
# Note: This is `letsencrypt_cf` by default for backwards compatibility, you might want to use `letsencrypt_http` instead, depending on your setup
|
||||||
gitlab_traefik_certresolver: letsencrypt_http
|
gitlab_traefik_certresolver: letsencrypt_http
|
||||||
|
|
|
@ -203,7 +203,16 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ gitlab_data_location }}:/var/opt/gitlab"
|
- "{{ gitlab_data_location }}:/var/opt/gitlab"
|
||||||
- "{{ gitlab_config_location }}:/etc/gitlab"
|
- "{{ gitlab_config_location }}:/etc/gitlab"
|
||||||
|
{% if gitlab_log_tmpfs %}
|
||||||
- "{{ gitlab_log_location }}:/var/log/gitlab"
|
- "{{ gitlab_log_location }}:/var/log/gitlab"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if gitlab_log_tmpfs %}
|
||||||
|
tmpfs:
|
||||||
|
- "/var/log/gitlab:size=1G,noexec,nodev,nosuid,rw"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "{{ gitlab_ssh_port }}:22"
|
- "{{ gitlab_ssh_port }}:22"
|
||||||
|
|
Loading…
Add table
Reference in a new issue