Setting up docker letsencrypt properly

Hello
i have Ubuntu Server 20.04 with docker,
i have an Nginx docker which is running my website just fine.

However, i am trying to use the docker certbot.
to try to get certifications

i tried going by this website but at the end i received an error of connection refused..

i have opened ports 80 and 443 on my ubuntu server 20.04 so it should work just fine. im guessing it has to do with docker.. below is my docker yml which is running my website just fine.. how can i add certbot and certbot certificates.. if anyone has the most easy way of simply generating the certs outside

version: '3'
services:
nginx:
image: nginx:latest
container_name: nginx-docker
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./mycoolsite:/code
- ./site.conf:/etc/nginx/conf.d/site.conf
depends_on:
- php
php:
image: php:8-fpm
container_name: php-docker
volumes:
- ./mycoolsite:/code

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.