Hello guys. I was following this tutorial How To Secure a Containerized Node.js Application with Nginx, Let’s Encrypt, and Docker Compose, which is very complete and easy to go through. But, what if I want to create a wildcard certificate with Let’s Encrypt to deploy along with all my API? How difficult would it be to adapt the instructions from this article? By the way, this wildcard certificate would be valid to a web server as well, right?
Best regards
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @renatospaka,
I believe that in order to obtain a wildcard SSL certificate you would have to adjust the following line in your docker-compose file:
command: certonly --webroot --webroot-path=/var/www/html --email sammy@example.com --agree-tos --no-eff-email --force-renewal -d example.com -d www.example.com
And set it to:
command: certonly --webroot --webroot-path=/var/www/html --email sammy@example.com --agree-tos --no-eff-email --force-renewal -d example.com -d *.example.com
This would generate a wildcard SSL certificate which you could use for all of your subdomains.
Hope that this helps! Regards, Bobbt
Hello @bobbyiliev
Thanks for your reply. Another question: can I create an isolated container only for certbot certificate information and associate it with a docker-compose when needed?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.