Thanks for the quick reply!!
docker compose -f docker-compose.prod.yml run --rm certbot certonly -d efpsychis.gr
after some searching i also generated a cert for www.efpsychis.gr using the same command as above
the docker compose has the volumes at nginx container and certbot image
ssl checker says : Hostname: close Doesn't match Common Name or/and SANs
The certonly subcommand will only get you a certificate, you need to install it yourself. If you installed it incorrectly into your webserver, you can get these kind of inconsistent results.
Speaking about inconsistent: looking at your cert history at https://crt.sh/?deduplicate=Y&q=efpsychis.gr it looks like you've renewed most of the older certs except for the www subdomain. And the dates of renewal are also not consistent it seems: the latest cert for `awstats was issued a day after you'd expect. Do you have renewal automated?
Also, I'm interested what kind of certificates are currently available to Certbot, as it's relatively easy to suddenly have two certs for the domain with overlapping certs. Usually you could just run sudo certbot certificates, but with Docker I have no idea how that would work.
Renewing an existing certificate for efpsychis.gr and www.efpsychis.gr
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/efpsychis.gr/fullchain.pem
Key is saved at: /etc/letsencrypt/live/efpsychis.gr/privkey.pem
This certificate expires on 2023-05-28.
These files will be updated when the certificate renews.