Make sure you have a domain(or subdomain) and SSH access to an instance. This works well under a DigitalOcean's Ubuntu with Docker and Docker Compose installed.
- Run as
root
chmod -R 777 jenkins/jenkins_home
sudo chmod -R 777 /var/run/docker.sock
it isnt ideal, but only thing that works- Set in
docker-compose.yml
andssl_gen.sh
the DOMAIN=domain.com . - Delete all DELETE_ME.yml files in
certs
,certs-data
,jenkins/jenkins_home
,jenkins/projects
(keep folders). -
docker-compose up -d
chmod +x *.sh && ./ssl_gen.sh
- After it succeeds, start it with
docker-compose restart
This will schedule a renewal of the SSL cert with Let's Encrypt every 15 days.
crontab -u $USER -e
0 0 */15 * * /home/gg/jenkins/ssl_renew.sh
- this works better as
root
user, but feel free to try with other users. - Is there a DNS A record pointing to the server?
- Are you using domain.com? (use your own)
- If let's encrypt fails, delete all certs and certs-data files and try again.
- Did you make sure all the
DELETE_ME.yml
are gone? - Tweak jenkins memory by going into jenkins.dockerfile
ENV JAVA_OPTS="-Xmx2048m"