Enable SSL on GitLab with Docker on Synology NAS

Crami picture Crami · Aug 3, 2015 · Viewed 20.7k times · Source

I have a working installation of GitLab via the official GitLab Package on my Synology NAS (DSM 5.2) in a Docker container.

I now like to access the Webinterface via https instead of just http. I have seen in several posts that it is possible to do with some docker magic, but did not find any detailed instructions.

Can anyone please explain how to achieve this?

It's a pity that this is not default.

Answer

helt picture helt · Apr 4, 2016

With DSM6, the changes (except generation of the cert) are now possible using the dsm docker interface:

1) Create a key/cert:

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) Set up gitlab docker environment:

setting gitlab docker environment vars via DSM gui

3) Set gitlab docker port bindings: Set port binding for gitlab