這是本文件的舊版!
GitLab 安裝相關紀錄
採用 docker image 的安裝, 希望可以安裝後就決定一些預期設定, 發現有 Omnibus 可以在啟動 docker 時就將設定傳入
Gitlab docker 啟動參數設定
- 採用 Gitlab 官方 docker image 版本 : 12.10.6
- gitlab/gitlab-ce:12.10.6-ce.0
- GITLAB_OMNIBUS_CONFIG 可設定
- gitlab 網址 : external_url 'http://http://git-demo.ichiayi.com'
- Prometheus 監控 : prometheus_monitoring['enable'] = false
- Container Registry : gitlab_rails['gitlab_default_projects_features_container_registry'] = false;
- 預設的 root 密碼 : gitlab_rails['initial_root_password'] = '«Passwd_Is_Here»'
- CI/CD Pipeline : gitlab_rails['gitlab_default_projects_features_builds'] = 'false'
- Docker
- port : 80 / 443
- name : gitlab
- restart : 每次開機都自動啟動
- Volume 掛載 :
- /etc/gitlab → /NAS_dir/gitlab/config
- /var/log/gitlab → /NAS_dir/gitlab/logs
- /var/opt/gitlab → /NAS_dir/gitlab/data
- 實際執行的語法:
sudo docker run --env GITLAB_OMNIBUS_CONFIG="external_url 'http://git-demo.ichiayi.com'; \ prometheus_monitoring['enable'] = false; \ gitlab_rails['gitlab_default_projects_features_container_registry'] = false; \ gitlab_rails['initial_root_password'] = '<<Passwd_Is_Here>>'; \ gitlab_rails['gitlab_default_projects_features_builds'] = 'false'" \ --detach --publish 443:443 --publish 80:80 --name gitlab --restart always \ --volume /NAS_dir/gitlab/config:/etc/gitlab \ --volume /NAS_dir/gitlab/logs:/var/log/gitlab \ --volume /NAS_dir/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:12.10.6-ce.0