垂直类网站怎么做,营销方案100例,网页版微信官方登录,网站定制开发费用多少Gitlab部署文档 1、配置环境变量
export GITLAB_HOME/srv/gitlab2、创建docker-compose.yml文件
修改http端口需要同步修改external_url修改ssh端口需要同步修改gitlab_rails[‘gitlab_shell_ssh_port’]volumes#xff1a;容器数据的持久化存储#xff0c;强烈推荐。除非你…Gitlab部署文档 1、配置环境变量
export GITLAB_HOME/srv/gitlab2、创建docker-compose.yml文件
修改http端口需要同步修改external_url修改ssh端口需要同步修改gitlab_rails[‘gitlab_shell_ssh_port’]volumes容器数据的持久化存储强烈推荐。除非你希望重启容器就将Gitlab重置
version: 3.6
services:web:image: registry.gitlab.cn/omnibus/gitlab-jh:latestrestart: always# 云服务器iphostname: 0.0.0.0 environment:# 云服务器地址GITLAB_OMNIBUS_CONFIG: |external_url http://0.0.0.0:8989 gitlab_rails[gitlab_shell_ssh_port] 2222 ports:# 这里两个端口号都需要改- 8989:8989 - 443:443# 修改ssh端口号需要同步修改gitlab_shell_ssh_port- 2222:22 volumes:- $GITLAB_HOME/config:/etc/gitlab- $GITLAB_HOME/logs:/var/log/gitlab- $GITLAB_HOME/data:/var/opt/gitlabshm_size: 256m使用docker compose up -d 启动 3、获取超级管理员账号密码
方案一系统自动生成的密码 自动生成的密码只有24小时的保留期限 进入容器内部docker exec -it ah69c7j89k3f /bin/bash 查看初始密码cat /etc/gitlab/initial_root_password 以该方法登录后需要修改管理员密码 方案二重置root密码
如果使用方案一登录无效则需要使用方案二重置root密码后登录。参考官方文档
进入容器内部docker exec -it be28b6c5223f /bin/bash 进入rails控制台 gitlab-rails console 查找到root用户user User.find_by_username root 重置密码user.password自己设置一个密码 保存user.save!
方案三重置root密码
docker exec -it ah69c7j89k3f /bin/bash
# su - git
$ gitlab-rake gitlab:password:reset[root]
Enter password:
Confirm password:
Unable to change password of the user with username root.
Password must not contain commonly used combinations of words and letters
$ gitlab-rake gitlab:password:reset[root]
Enter password:
Confirm password:
Password successfully updated for user with username root.
$