sameersbn / sameersbn/docker-gitlab
How to reload when renewing certificates
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
I am using GitLab Container Registry with Let's encrypt.
I am looking for a way to reload the certificate when it is renewed.
Is there a better way than the following command?
docker compose -f /foo/docker-compose.yml restart
docker compose restart has a long downtime and I would like to know a faster way.
Omnibus GitLab seems to do it with the following command
https://docs.gitlab.com/omnibus/settings/ssl.html#renew-the-certificates-automatically
sudo gitlab-ctl reconfigure
My configuration: /foo/docker-compose.yml
services:
...
gitlab:
restart: always
image: sameersbn/gitlab:15.3.3
...
volumes:
- /etc/letsencrypt/live/example.com:/root/certs:ro
- /etc/letsencrypt/archive:/archive:ro
...
environment:
- GITLAB_REGISTRY_CERT_PATH=/root/certs/fullchain.pem
- GITLAB_REGISTRY_KEY_PATH=/root/certs/privkey.pem
...
...
registry:
restart: always
image: registry:2.8.1
...
volumes:
- /etc/letsencrypt/live/example.com:/root/certs:ro
- /etc/letsencrypt/archive:/archive:ro
...
environment:
- REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/root/certs/fullchain.pem
- REGISTRY_HTTP_TLS_CERTIFICATE=/root/certs/fullchain.pem
- REGISTRY_HTTP_TLS_KEY=/root/certs/privkey.pem
...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied /foo/docker-compose.yml and review how the GitLab and registry services consume the mounted certificate files and TLS environment variables. Check the documented reload or restart behavior for these images; done means identifying a renewal path with less downtime than docker compose restart and documenting how to verify the renewed certificates are active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, gitlab
- Domain
- devops, infrastructure, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100