1. Gitlab on Podman / With SSL
export GITLAB_HOME=/home/mack/sw/srv/gitlab podman run --detach \ --hostname git.lowsig.com \ --publish 7443:443 --publish 7080:80 --publish 1922: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 \ --shm-size 256m \ gitlab/gitlab-ce:latest
1.1. Common Operations for Gitlab in Container
- starting - run ./start-ce (need to rm it first, see step 3)
- stopping - run podman stop gitlab
- remove container each time - podman rm gitlab
- backup management
creation of self signed certificate
openssl genrsa -out server-key.pem 4096a openssl req -new -key server-key.pem -out server.csr openssl x509 -req -days 365 -in server.csr -signkey server-key.pem -out server-cert.pem mv server-cert.pem git.lowsig.com.crt mv server-key.pem git.lowsig.com.key
- update config to use certificates
- ensure letsencrypt is turned off
- gitlab-ctl reconfigure
1.1.1. Backups
podman exec -it gitlab gitlab-backup create
Backups are in the SRV/gitlab/data/backups directory.
1.1.2. Upgrades
These are the steps I used successfully:
- perform backup
- podman stop gitlab
- podman rm gitlab
re-pull the latest version and start it up as normal
podman pull docker.io/gitlab/gitlab-ce:latest ./start-ce
- when it starts, it will upgrade itself in a few minutes
1.1.3. Shutting Down
It seems like when I do podman stop gitlab, gitlab takes too long and podman just kills it hard. So I'd suggest stopping it with a delay. I've created this script:
podman stop --time 60 gitlab