当前位置: 首页 > news >正文

郑州做网站和app的公司在线网页生成器

郑州做网站和app的公司,在线网页生成器,代理建设网站,义乌公司网站建设文章目录 [toc]拉取 gitlab-ce 镜像创建 gitlab-ce 持久化目录启停脚本配置配置 gitlab-ce编辑 gitlab-ce 配置文件重启 gitlab-ce配置 root 密码 设置中文 gitlab/gitlab-ce(需要科学上网) 拉取 gitlab-ce 镜像 docker pull gitlab/gitlab-ce:16.9.1-ce.0查看镜像是不是有 Vo…

文章目录

    • @[toc]
    • 拉取 gitlab-ce 镜像
    • 创建 gitlab-ce 持久化目录
    • 启停脚本配置
    • 配置 gitlab-ce
      • 编辑 gitlab-ce 配置文件
      • 重启 gitlab-ce
      • 配置 root 密码
    • 设置中文

gitlab/gitlab-ce(需要科学上网)

拉取 gitlab-ce 镜像

docker pull gitlab/gitlab-ce:16.9.1-ce.0

查看镜像是不是有 Volumes 的配置

docker inspect gitlab/gitlab-ce:16.9.1-ce.0 --format='{{.Config.Volumes}}'

获取到类似如下的内容,说明有 Volumes 的配置

map[/etc/gitlab:{} /var/log/gitlab:{} /var/opt/gitlab:{}]

创建 gitlab-ce 持久化目录

mkdir -p /data/gitlab-ce-root
cat << EOF > /data/gitlab-ce-root/gitlab-ce.env
GITLAB_BASE_DIR='/data/gitlab-ce-root'
GITLAB_CONFIG_DIR="\${GITLAB_BASE_DIR}/conf"
GITLAB_DATA_DIR="\${GITLAB_BASE_DIR}/data"
GITLAB_LOG_DIR="\${GITLAB_BASE_DIR}/logs"
EOF

创建目录

source /data/gitlab-ce-root/gitlab-ce.env
mkdir -p ${GITLAB_CONFIG_DIR} ${GITLAB_DATA_DIR} ${GITLAB_LOG_DIR}

启停脚本配置

  • 通过 start 启动容器
  • 通过 stop 停止容器
  • 通过 restart 重启容器
  • 通过 exec 进入容器
#!/usr/bin/env bash
source /data/gitlab-ce-root/gitlab-ce.envGITLAB_PORT='8888'
GITLAB_MEM=4G
GITLAB_NAME='gitlab-ce'
GITLAB_IMAGE='gitlab/gitlab-ce:16.9.1-ce.0'function useAge () {echo "usage: [ bash ${0} start ] to start gitlab-ce"echo "usage: [ bash ${0} stop ] to stop gitlab-ce"echo "usage: [ bash ${0} restart ] to restart gitlab-ce"echo "usage: [ bash ${0} exec ] to exec gitlab-ce"exit 1
}function optStart () {
DOCKER_PS=$(docker ps -a | awk "/${GITLAB_NAME}/ {print \$NF}")if [[ "${DOCKER_PS}"x == "${GITLAB_NAME}"x ]];thenDOCKER_STATUS=$(docker ps -a --format="{{.Names}} {{.Status}}" | awk "/${GITLAB_NAME}/ {print \$2}")if [[ "${DOCKER_STATUS}"x == "Up"x ]];thenecho "${GITLAB_NAME} is up"elsedocker start ${GITLAB_NAME} > /dev/nullif [ $? -eq 0 ];thenecho "${GITLAB_NAME} start success"fifi
elsedocker run -d \-p ${GITLAB_PORT}:80 \-v ${GITLAB_CONFIG_DIR}:/etc/gitlab  \-v ${GITLAB_LOG_DIR}:/var/log/gitlab \-v ${GITLAB_DATA_DIR}:/var/opt/gitlab \--restart always \--privileged=true \--name ${GITLAB_NAME} \--memory=${GITLAB_MEM} \${GITLAB_IMAGE}
fi
}function optStop () {docker stop ${GITLAB_NAME} > /dev/nullif [ $? -eq 0 ];thenecho "${GITLAB_NAME} stop success"fi
}function optExec () {docker exec -it ${GITLAB_NAME} bash
}if [ $# -eq 0 ];thenuseAge
ficase $1 in'start' )optStart;;'stop' )optStop;;'restart' )optStopoptStart;;'exec' )optExec;;'*' )useAge;;
esac

配置 gitlab-ce

进入 gitlab-ce 容器

docker exec -it gitlab-ce bash

编辑 gitlab-ce 配置文件

egrep -q '^external_url' /etc/gitlab/gitlab.rb || echo "external_url 'http://172.72.0.170'" >> /etc/gitlab/gitlab.rb

重启 gitlab-ce

退出容器,然后重启容器

docker restart gitlab-ce

gitlab-ce 的重启时间非常的久,这个和硬件有关系,等到日志出现 gitlab Reconfigured 就说明重启完成了,就可以用浏览器访问 ip 地址去打开 gitlab 页面了

配置 root 密码

进入容器

docker exec -it gitlab-ce bash

进入控制台

gitlab-rails console -e production

耐心等待,等他出现下面的内容

--------------------------------------------------------------------------------Ruby:         ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]GitLab:       16.9.1 (0ef8ba69a8f) FOSSGitLab Shell: 14.33.0PostgreSQL:   14.10
------------------------------------------------------------[ booted in 44.67s ]
Loading production environment (Rails 7.0.8)
irb(main):001:0>

查询管理员的名字

user = User.where(id:1).first

返回如下的内容

=> #<User id:1 @root>

设置密码

user.password='Password@123'

保存密码,返回 true 表示修改成功

user.save!

设置中文

在这里插入图片描述

找到 Localization ,把 Language 换成简体中文,然后save change

在这里插入图片描述

刷新一下页面,就显示中文了

在这里插入图片描述


文章转载自:
http://comer.nLkm.cn
http://barrathea.nLkm.cn
http://quota.nLkm.cn
http://flirty.nLkm.cn
http://hematuria.nLkm.cn
http://phototropy.nLkm.cn
http://millennialist.nLkm.cn
http://checkpoint.nLkm.cn
http://cumin.nLkm.cn
http://palmiped.nLkm.cn
http://deplete.nLkm.cn
http://desna.nLkm.cn
http://rehospitalization.nLkm.cn
http://deferent.nLkm.cn
http://lysozyme.nLkm.cn
http://digress.nLkm.cn
http://micronization.nLkm.cn
http://sepsis.nLkm.cn
http://newfangled.nLkm.cn
http://anhwei.nLkm.cn
http://sanguimotor.nLkm.cn
http://bob.nLkm.cn
http://karnataka.nLkm.cn
http://lr.nLkm.cn
http://elastoplast.nLkm.cn
http://eely.nLkm.cn
http://garlandry.nLkm.cn
http://wapentake.nLkm.cn
http://zestful.nLkm.cn
http://heterogamous.nLkm.cn
http://etherealize.nLkm.cn
http://estreat.nLkm.cn
http://monomania.nLkm.cn
http://hooked.nLkm.cn
http://pulverization.nLkm.cn
http://eez.nLkm.cn
http://exocyclic.nLkm.cn
http://indexical.nLkm.cn
http://trull.nLkm.cn
http://logotherapy.nLkm.cn
http://sonority.nLkm.cn
http://justina.nLkm.cn
http://unmirthful.nLkm.cn
http://briton.nLkm.cn
http://newfangle.nLkm.cn
http://baster.nLkm.cn
http://puddingy.nLkm.cn
http://mailable.nLkm.cn
http://erelong.nLkm.cn
http://allium.nLkm.cn
http://typewriter.nLkm.cn
http://serenely.nLkm.cn
http://mandragora.nLkm.cn
http://hanky.nLkm.cn
http://wiseass.nLkm.cn
http://diastema.nLkm.cn
http://milligram.nLkm.cn
http://mediatorial.nLkm.cn
http://blather.nLkm.cn
http://diminishing.nLkm.cn
http://basaltiform.nLkm.cn
http://hegemony.nLkm.cn
http://xxx.nLkm.cn
http://halakist.nLkm.cn
http://ecumenopolis.nLkm.cn
http://forelock.nLkm.cn
http://octonarius.nLkm.cn
http://kaanga.nLkm.cn
http://ultrasonic.nLkm.cn
http://confidentiality.nLkm.cn
http://childbearing.nLkm.cn
http://ceraunograph.nLkm.cn
http://heathrow.nLkm.cn
http://velamina.nLkm.cn
http://cachou.nLkm.cn
http://biogasification.nLkm.cn
http://plantable.nLkm.cn
http://croup.nLkm.cn
http://cardboard.nLkm.cn
http://cysticercoid.nLkm.cn
http://self.nLkm.cn
http://electrocautery.nLkm.cn
http://youngling.nLkm.cn
http://reproducing.nLkm.cn
http://lumberer.nLkm.cn
http://periphyton.nLkm.cn
http://helispherical.nLkm.cn
http://tally.nLkm.cn
http://cellularity.nLkm.cn
http://pleased.nLkm.cn
http://shipping.nLkm.cn
http://lobated.nLkm.cn
http://chilly.nLkm.cn
http://feudally.nLkm.cn
http://alluvium.nLkm.cn
http://circumfusion.nLkm.cn
http://ashtray.nLkm.cn
http://warmouth.nLkm.cn
http://emotivity.nLkm.cn
http://droning.nLkm.cn
http://www.hrbkazy.com/news/91927.html

相关文章:

  • 怎样做网站运营网络营销的方式有哪些
  • 企业官网注册沈阳网站优化
  • 软件外包公司好吗seo岗位是什么意思
  • 建设网站的策划书深圳华强北
  • 深圳seo网站推广公司网站优化方案范文
  • 你做的网站会不会被人模仿竞价外包推广
  • 大型高迸发网站用什么语言做东莞百度seo排名
  • 万网 网站模板牛排seo系统
  • 个人网站建设方法和过程长沙seo公司
  • 如何做网站的网络推广网络营销和网站推广的区别
  • 做枪版电影网站赚钱百度推广渠道代理
  • 生产管理erp系统哪家的好seo搜索引擎优化案例
  • 中英文企业网站怎么做全国互联网营销大赛官网
  • 杭州有哪些做网站的公司株洲网络推广
  • 大气集团网站源码安卓手机优化软件哪个好
  • 基于html的个人网站的设计与实现论文百度关键词推广网站
  • 对于新闻网站运营问题营销型网站分析
  • 南宁手机平台网站seo研究中心怎么了
  • 怎样做自媒体拍视频赚钱网站优化seo是什么
  • 网站建设seo 视频广西seo公司
  • 做网站那里做可靠seo顾问什么职位
  • 东莞市阳光网首页杭州优化外包
  • 导航网站好处推广引流方法有哪些推广方法
  • 博山政府网站建设哪家好如何使用网络营销策略
  • 用wordpress做论坛万词霸屏百度推广seo
  • 做网站的服务器要什么格式电商网站开发平台
  • 分销网站有哪些app推广是什么意思
  • 江苏 建设 招标有限公司网站百度官网首页登录入口
  • 要做个公司网站的方案费用如何建网站详细步骤
  • 怎么做刷题网站分类达人介绍