lasthourcloud/src/lib/queues/sslrenewal.ts

14 lines
398 B
TypeScript
Raw Normal View History

2022-02-10 15:47:44 +01:00
import { asyncExecShell } from '$lib/common';
2022-03-02 21:04:42 +01:00
import { reloadHaproxy } from '$lib/haproxy';
2022-02-10 15:47:44 +01:00
export default async function () {
try {
2022-03-02 21:04:42 +01:00
await asyncExecShell(
2022-02-10 15:47:44 +01:00
`docker run --rm --name certbot-renewal -v "coolify-letsencrypt:/etc/letsencrypt" certbot/certbot --logs-dir /etc/letsencrypt/logs renew`
);
2022-03-02 21:04:42 +01:00
await reloadHaproxy('unix:///var/run/docker.sock');
2022-02-10 15:47:44 +01:00
} catch (error) {
throw error;
}
}