gitlab修改redis、postgresql配置

由于工作需要将redis认证方式改为了允许远程连接,并作了requirepass设置,postgresql认证方式也改为了允许远程连接并且需要通过密码。

引起的问题


提交的动态无法写入,表现在gitlab上就是提交的动态无法在首页显示,postgresql中也没有提交记录

解决办法


  1. 修改gitlab数据库配置 /home/git/gitlab/config/database.yml
production:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_production
  pool: 10
  username: 用户名
  password: 密码
  host: localhost
  port: 5432
  1. 修改resque.yml 配置,主要是连接redis配置
development: redis://:密码@localhost:6379/数据库(可选)
test: redis://:密码@localhost:6379/数据库(可选)
production: redis://:密码@localhost:6379/数据库(可选)
  1. 修改gitlab-shell中redis配置, 连接redis配置 /home/git/gitlab-shell/config.yml
redis:
  bin: /usr/bin/redis-cli
  host: localhost
  port: 6379
  password: 密码
  db: 数据库
  namespace: resque:gitlab
  1. 修改gitlab程序 /home/git/gitlab-shell/lib/gitlab_config.rb 58行
//加上密码和数据库参数
%W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']} -a #{redis['password']} -n #{redis['db']})

转载于:https://my.oschina.net/wanglihui/blog/381130

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
GitLab是一个基于Git的版本控制系统和代码托管平台,它在企业和开源社区中广泛使用。GitLab有一个配置文件gitlab.rb,可以用于配置GitLab的各种设置。下面是这个配置文件的详细解释: 1. 外部URL 外部URL是GitLab的根网址,用于访问GitLab。在gitlab.rb配置文件中可以设置这个URL,例如: external_url 'https://gitlab.example.com' 2. SMTP设置 GitLab可以通过SMTP服务器发送电子邮件。在gitlab.rb配置文件中可以配置SMTP服务器的设置,例如: gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.example.com" gitlab_rails['smtp_port'] = 587 gitlab_rails['smtp_user_name'] = "user" gitlab_rails['smtp_password'] = "password" gitlab_rails['smtp_domain'] = "example.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true 3. PostgreSQL设置 GitLab使用PostgreSQL作为其默认数据库,可以在gitlab.rb配置文件中配置PostgreSQL的设置,例如: postgresql['enable'] = true postgresql['username'] = "gitlab" postgresql['password'] = "password" postgresql['database'] = "gitlabhq_production" postgresql['host'] = "localhost" postgresql['port'] = 5432 postgresql['sslmode'] = "verify-full" 4. Redis设置 GitLab使用Redis作为它的缓存和队列服务器,可以在gitlab.rb配置文件中配置Redis的设置,例如: redis['enable'] = true redis['host'] = "localhost" redis['port'] = 6379 redis['password'] = "password" redis['database'] = 0 5. Unicorn设置 GitLab使用Unicorn作为它的Web服务器,可以在gitlab.rb配置文件中配置Unicorn的设置,例如: unicorn['worker_processes'] = 2 unicorn['listen'] = 'localhost' unicorn['port'] = 8080 unicorn['socket'] = '/var/run/gitlab/gitlab.socket' unicorn['pidfile'] = '/var/run/gitlab/gitlab.pid' unicorn['worker_timeout'] = 60 unicorn['log_directory'] = "/var/log/gitlab/unicorn" 以上是gitlab.rb配置文件的一些常见设置,可以根据需要进行修改
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值