Skip to content

Changing gitlab configuration

  • gitlab
  • configuration

Apply changes after editing gitlab config file.

docker ps
docker ps

CONTAINER ID   IMAGE                     COMMAND             CREATED          STATUS                    PORTS                                                                                                         NAMES
c650dfe712df   gitlab/gitlab-ee:latest   "/assets/wrapper"   41 minutes ago   Up 40 minutes (healthy)   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:23->22/tcp, :::23->22/tcp   gitlab
docker exec -it gitlab sh
gitlab-ctl reconfigure

Git lab Mounting NFS v4.1

truenas.centerionware.com:/mnt/Nas8TB/Gitlab /mnt/Gitlab nfs4 x-systemd.automount,defaults,vers=4.1,hard,rsize=1048576,wsize=1048576,noatime,nofail,_netdev,lookupcache=positive 0 2 
sudo docker logs -f gitlab

(source: https://docs.gitlab.com/ee/install/docker.html )

sudo docker run --detach   --hostname gitlab.centerionware.com \
  --ip 172.20.0.20 --ip 172.20.0.21 \
  -p 192.168.0.206:8080:8080 \
  -p 192.168.0.206:443:443 \
  -p 192.168.0.206:80:80 \
  -p 192.168.0.201:80:800 \
  -p 192.168.0.206:3322:22 \
  -p 192.168.0.206:8065:8065 \
  --name gitlab   --restart unless-stopped \
  --volume /mnt/Gitlab/config:/etc/gitlab \
  --volume /mnt/Gitlab/logs:/var/log/gitlab \
  --volume /mnt/Gitlab/data:/var/opt/gitlab \
  --volume /mnt/Gitlab/repository/repo:/var/opt/gitlab/gitlab-rails/shared/registry \
  --shm-size 256m   gitlab/gitlab-ee:latest

Launching Docker

sudo docker run --detach \
  --hostname gitlab.centerionware.com \
  --publish 8080:8080 --publish 172.20.0.3:443:443 --publish 172.20.0.3:80:80 --publish 172.20.0.5:80 --publish 3322:22 \
  --publish 8065:8065 \
  --name gitlab \
  --restart unless-stopped \
  --volume /mnt/Gitlab/config:/etc/gitlab \
  --volume /mnt/Gitlab/logs:/var/log/gitlab \
  --volume /mnt/Gitlab/data:/var/opt/gitlab \
  --volume /mnt/Gitlab/repository/repo:/var/opt/gitlab/gitlab-rails/shared/registry \
  --shm-size 256m \
  gitlab/gitlab-ee:latest
sudo docker run --detach \
  --hostname gitlab.example.com \
  --publish 443:443 --publish 80:80 --publish 22:22 \
  --name gitlab \
  --restart always \
  --volume $GITLAB_HOME/config:/etc/gitlab:Z \
  --volume $GITLAB_HOME/logs:/var/log/gitlab:Z \
  --volume $GITLAB_HOME/data:/var/opt/gitlab:Z \
  --shm-size 256m \
  gitlab/gitlab-ee:latest

/var/opt/gitlab/gitlab-rails/shared/registry

drop the db

sudo gitlab-ctl stop mattermost

# Drop the Mattermost database
sudo -u gitlab-psql /opt/gitlab/embedded/bin/dropdb -U gitlab-psql -h /var/opt/gitlab/postgresql -p 5432 mattermost_production

remove mattermost files

rm -r /var/opt/gitlab/mattermost

Last update: 2023-10-27