yum安装
https://about.gitlab.com/install/curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
yum install gitlab-ce
|
/etc/gitlab/gitlab.rbexternal_url "http://ip:port"
|
Docker安装Gitlab
准备好挂载的目录# 创建挂载目录 mkdir -p /home/docker/gitlab/{config,log,data}
|
docker-compose.yml/home/docker/gitlab/docker-compose.ymlversion: "3" services: gitlab: image: gitlab/gitlab-ce:latest container_name: gitlab restart: "always" privileged: true hostname: "192.168.56.29" environment: TZ: "Asia/Shanghai" GITLAB_OMNIBUS_CONFIG: | # 域名的话就不能带端口号 external_url 'http://192.168.56.29:8180' gitlab_rails['time_zone'] = 'Asia/Shanghai' gitlab_rails['gitlab_shell_ssh_port'] = 8222 # clone地址中ssh对应的端口号 ports: - "8180:8180" - "8222:22" - "8443:443" volumes: - /home/docker/gitlab/config:/etc/gitlab - /home/docker/gitlab/log:/var/log/gitlab - /home/docker/gitlab/data:/var/opt/gitlab
|
执行 docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
获取初始密码
轻量化运行
原文:https://zhuanlan.zhihu.com/p/389717047
gitlab_rails['smtp_enable'] = false gitlab_rails['gitlab_email_enabled'] = false gitlab_rails['incoming_email_enabled'] = false
gitlab_rails['terraform_state_enabled'] = false
gitlab_rails['usage_ping_enabled'] = false gitlab_rails['sentry_enabled'] = false grafana['reporting_enabled'] = false
gitlab_rails['gitlab_default_projects_features_container_registry'] = false gitlab_rails['registry_enabled'] = false registry['enable'] = false registry_nginx['enable'] = false
gitlab_rails['packages_enabled'] = false gitlab_rails['dependency_proxy_enabled'] = false
gitlab_kas['enable'] = false gitlab_rails['gitlab_kas_enabled'] = false
mattermost['enable'] = false mattermost_nginx['enable'] = false
gitlab_rails['kerberos_enabled'] = false sentinel['enable'] = false
gitlab_pages['enable'] = false pages_nginx['enable'] = false
puma['worker_processes'] = 0 puma['min_threads'] = 1 puma['max_threads'] = 2
sidekiq['max_concurrency'] = 5
gitlab_ci['gitlab_ci_all_broken_builds'] = false gitlab_ci['gitlab_ci_add_pusher'] = false
prometheus_monitoring['enable'] = false alertmanager['enable'] = false node_exporter['enable'] = false redis_exporter['enable'] = false postgres_exporter['enable'] = false pgbouncer_exporter['enable'] = false gitlab_exporter['enable'] = false grafana['enable'] = false sidekiq['metrics_enabled'] = false
|