#!/usr/bin/env python3

import subprocess
import time
import logging

logger = logging.getLogger(__name__)


logging.basicConfig(level=logging.INFO)

while True:
    subprocess.check_call([
        'docker', 'compose', 'exec', 'ssl-app', 'certbot', 'renew',
    ])
    subprocess.check_call([
        'docker', 'compose', 'exec', 'ssl-app', 'nginx', '-s', 'reload',
    ])
    break
