2

I have seen this question but it won't help me: docker-compose restart interval

I'm using a docker-compose.yml to renew my certificates:

services:
  certbot:
    container_name: certbot
    image: certbot/dns-ovh:latest
    volumes:
      - /etc/letsencrypt:/etc/letsencrypt
      - /var/lib/letsencrypt:/var/lib/letsencrypt
    restart: always
    command: certonly --dns-ovh --dns-ovh-credentials=/media/storage/.secrects/ovh.ini -d *.example.com -d

I know that unless-stoppedwould stop the container on error but what happens is no real error:

You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.,
What would you like to do?,
Please see the logfiles in /var/log/letsencrypt for more details.,
EOFError

A user interaction is needed. It would need to run only every month for example.

CptDayDreamer
  • 1,526
  • 6
  • 25
  • 61
  • 2
    Use a `crontab` to run your docker-compose every day or every week, using restart from docker-compose is maybe a bad idea for this usecase – J-Jacques M Mar 18 '20 at 09:02
  • @Jean-JacquesMOIROUX okay never really worked with crontabs but I will have a look thank you. – CptDayDreamer Mar 18 '20 at 09:05

0 Answers0