This repository has been archived on 2025-06-03. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
companion-setup/scripts/issue_cert.sh
2025-04-12 15:06:37 +02:00

12 lines
431 B
Bash
Executable file

#!/bin/bash
cd "$(dirname "$0")/.."
. .env
CERT_DIR=/etc/ssl/$DOMAIN
docker compose exec acme --issue --server letsencrypt -d $DOMAIN --webroot /var/www/html/$DOMAIN
docker compose exec acme rm $CERT_DIR/key.pem $CERT_DIR/fullchain.pem
docker compose exec acme --install-cert -d $DOMAIN --key-file $CERT_DIR/key.pem --fullchain-file $CERT_DIR/fullchain.pem
docker compose exec nginx nginx -s reload
echo "Certificate installed"