Created
December 20, 2019 16:12
-
-
Save pichuang/7ce8be00c3de3f51e5c8db0689f1e08a to your computer and use it in GitHub Desktop.
Running GitLab Container with podman and systemd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMAGE=docker.io/gitlab/gitlab-ce:12.2.0-ce.0 | |
HOSTNAME=gitlab.pichuang.local | |
NAME=gitlab-ce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=GitLab Podman container | |
After=network.target | |
[Service] | |
Type=simple | |
TimeoutStartSec=5m | |
Restart=always | |
RestartSec=30s | |
EnvironmentFile=/etc/sysconfig/gitlab | |
ExecStartPre=-/usr/bin/podman rm ${NAME} | |
ExecStart=/usr/bin/podman run \ | |
--name ${NAME} \ | |
--hostname ${HOSTNAME} \ | |
--publish 443:443 \ | |
--publish 80:80 \ | |
--publish 8022:22 \ | |
--volume /srv/gitlab/config:/etc/gitlab:Z \ | |
--volume /srv/gitlab/logs:/var/log/gitlab:Z \ | |
--volume /srv/gitlab/data:/var/opt/gitlab:Z \ | |
${IMAGE} | |
ExecReload=-/usr/bin/podman stop ${NAME} | |
ExecReload=-/usr/bin/podman rm ${NAME} | |
ExecStop=-/usr/bin/podman stop ${NAME} | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How well is this going with you? I'm planning to give GitLab a shot and using it locally at the beginning is a great method. Do CI/CD pipelines work with GitLab running with podman?