0

在反向代理后部署 GitLab

 1 year ago
source link: https://gythialy.github.io/gitlab-behind-a-reverse-proxy/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

在反向代理后部署 GitLab

2021-09-212022-05-12Notes

GitLab 官方提供的镜像,如果是单独部署服务的话,相对而言还是非常简单的,通过 Let’s Encrypt 自动获取 SSL 证书,其他的服务也可以运行在一个容器内,只要把数据库和文件存储放在宿主机中,然后挂载到容器内部即可。但是如果是在 GitLab 之前放置一个反向代理来实现 TLS 和负载均衡的话,默认的配置就不够了,需要额外的配置。

  • 配置 gitlab.local.rb

    gitlab.local.rb

  • 编写 docker-compose.yml

    docker-compose.yml

    • 通过 Docker Compose 启动
      docker-compose up -d
    • 通过 Docker Swarm 启动
      docker stack rm gitlab && \
      docker stack deploy --prune --with-registry-auth --resolve-image=always -c docker-compose.yaml gitlab

---EOF---


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK