gpt4 book ai didi

ssl - 在 Synology NAS 上使用 Docker 在 GitLab 上启用 SSL

转载 作者:IT老高 更新时间:2023-10-28 12:47:21 25 4
gpt4 key购买 nike

我在 Docker 容器中通过 Synology NAS (DSM 5.2) 上的官方 GitLab 包安装了 GitLab。

我现在喜欢通过 https 而不是 http 访问 Web 界面。我在几篇文章中看到可以使用一些 docker 魔术,但是没有找到任何详细的说明。

谁能解释一下如何做到这一点?

可惜这不是默认的。

最佳答案

使用 DSM6,现在可以使用 dsm docker 界面进行更改(证书生成除外):

1) 创建 key /证书:

mkdir /volume1/docker/gitlab/certs
cd /volume1/docker/gitlab/certs
openssl genrsa -out gitlab.key 2048
openssl req -new -key gitlab.key -out gitlab.csr
openssl x509 -req -days 3650 -in gitlab.csr -signkey gitlab.key -out gitlab.crt
openssl dhparam -out dhparam.pem 2048
chmod 400 gitlab.key

2) 搭建gitlab docker环境:

setting gitlab docker environment vars via DSM gui

3) 设置 gitlab docker 端口绑定(bind): Set port binding for gitlab

关于ssl - 在 Synology NAS 上使用 Docker 在 GitLab 上启用 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31791247/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com