Setup Rancher v2 behind nginx proxy, with Let's Encrypt certificates, within a docker environment.
Based on:
- The rancher doc that provides sample to configure nginx
- Docker-nginx-certbot a docker container providing nginx with certbot for Let's Encrypt SSL certificates
- Let's Encrypt a free, automated, and open Certificate Authority
- Edit env file and update CERTBOT_EMAIL with your email
- Edit the nginx proxy config and replace rancher.yourdomain.com
- Run the docker stack on your server
- Start certbot to generate your certificates, within the docker container
Start the docker stack
docker-compose up -d --build
Generate your certificates with certbot within the docker container