GitLab: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==Quick install==
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
==Docker Install==
{|
{|
| valign="top" |
| valign="top" |
Line 9: Line 14:
|}
|}


==Volumes Location==
===Volumes Location===
{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
Line 33: Line 38:
</source>
</source>


==External URL==
===External URL===
<source lang="bash">
<source lang="bash">
docker run --detach \
docker run --detach \

Revision as of 07:34, 14 June 2020

Quick install

curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

Docker Install

Linux:
export GITLAB_HOME=/srv/gitlab
MacOS:
export GITLAB_HOME=$HOME/gitlab

Volumes Location

Local location Container location Usage
$GITLAB_HOME/data /var/opt/gitlab For storing application data
$GITLAB_HOME/logs /var/log/gitlab For storing logs
$GITLAB_HOME/config /etc/gitlab For storing the GitLab configuration files
docker run --detach \
--hostname cdn.chorke.org \
--publish 4430:443 --publish 9050:80 --publish 4321:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

External URL

docker run --detach \
--hostname cdn.chorke.org \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://my.domain.com/'; gitlab_rails['lfs_enabled'] = true;" \
--publish 4430:443 --publish 9050:80 --publish 4321:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

Good To Know

SSH Local Forwarding:
ssh -L 9050:localhost:9050 [email protected]
http://localhost:9050/
user: root
pass: 5iveL!fe
docker logs gitlab
docker restart gitlab
docker exec -it gitlab /bin/bash
docker exec gitlab update-permissions

References