From 31146e52255637cfaba29b088c769cef8b586e7f Mon Sep 17 00:00:00 2001 From: RealStickman Date: Thu, 15 Sep 2022 21:06:33 +0200 Subject: [PATCH] WIP gitlab install --- pages/02.linux/31.gitlab/default.en.md | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 pages/02.linux/31.gitlab/default.en.md diff --git a/pages/02.linux/31.gitlab/default.en.md b/pages/02.linux/31.gitlab/default.en.md new file mode 100644 index 0000000..2192403 --- /dev/null +++ b/pages/02.linux/31.gitlab/default.en.md @@ -0,0 +1,53 @@ +--- +title: GitLab +visible: false +--- + +[toc] +## Container +https://docs.gitlab.com/ee/install/docker.html +``` +# podman run -d --name gitlab \ + --hostname gitlab.exu.li \ + -p 8080:80 -p 2222:22 \ + --volume /mnt/gitlab/config:/etc/gitlab \ + --volume /mnt/gitlab/logs:/var/log/gitlab \ + --volume /mnt/gitlab/data:/var/opt/gitlab \ + --shm-size 256m \ + docker.io/gitlab/gitlab-ce:latest +``` + +Starting the container for the first time takes a while + +After it is done, this command can be used to access the password for the initial `root` account. +`# podman exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password` +Make sure to do this within 24h after starting the container. The file will be deleted after that. + +## Configuration +The main configuration file is `/etc/gitlab/gitlab.rb` in the container. +GitLab can reread its configuration file by using the command `gitlab-ctl reconfigure` in the container. + +### Correct external URL +``` +external_url 'https://(url)' +``` + +### SMTP for email +``` +... +gitlab_rails['smtp_enable'] = true +gitlab_rails['smtp_address'] = "(smtp server address)" +gitlab_rails['smtp_port'] = 465 +gitlab_rails['smtp_user_name'] = "(smtp user)" +gitlab_rails['smtp_password'] = "(smtp password)" +gitlab_rails['smtp_domain'] = "(your domain)" +gitlab_rails['smtp_authentication'] = "login" +gitlab_rails['smtp_enable_starttls_auto'] = true +gitlab_rails['smtp_openssl_verify_mode'] = 'peer' + +# If your SMTP server does not like the default 'From: gitlab@localhost' you +# can change the 'From' with this setting. +gitlab_rails['gitlab_email_from'] = '(full email address)' +gitlab_rails['gitlab_email_reply_to'] = '(full email address)' +... +```