This is a docker-compose project to make a sonarqube instance.
It uses postgresql, and nginx with a TLS certificate provided by Let's Encrypt
You'll need
- certbot
- docker
- docker-compose
Make sure there's no process using port 80 in your host. Then use certbot to make a TLS certificate.
$ certbot certonly
Open nginx.conf
, then replace these lines:
ssl_certificate /etc/letsencrypt/live/sonarjessy.ddns.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sonarjessy.ddns.net/privkey.pem;
With:
ssl_certificate /etc/letsencrypt/live/YOURHOST/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/YOURHOST/privkey.pem;
Where YOURHOST
is the domain name of your certificate.
$ docker-compose up -d
I'm a very lazy person. So, because I don't need the service being up while renewing certificate, I just shut down the service and then renew the certificate.
docker-compose down
certbot renew
docker-compose up -d