renew certs with token handled by gopass

main
Ricard Illa 2022-09-23 10:18:27 +02:00
parent c44d7566d1
commit f00a5adbed
1 changed files with 10 additions and 4 deletions

View File

@ -22,14 +22,20 @@ KEY=$(CERT_PATH)/$(DOMAIN).key
$(CERT): renew_certs $(CERT): renew_certs
$(KEY): renew_certs $(KEY): renew_certs
ACMESH_COMPOSE_FILE=/srv/services/acmesh/docker-compose.yml GOPASS=doas -u gopass gopass
LINODE_TOKEN = $(shell $(GOPASS) linode.com/token)
DOCKER_IMAGE=neilpang/acme.sh
ACME_DATA_DIR=/mnt/docker_volumes/acmesh/data
RENEW_CMD="/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" --config-home "/acme.sh" RENEW_CMD="/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" --config-home "/acme.sh"
renew_certs: renew_certs:
docker-compose \ docker run --rm -it \
--file $(ACMESH_COMPOSE_FILE) \ -v $(ACME_DATA_DIR):/acme.sh \
run --rm acmesh \ -v $(CERT_PATH):/acme.sh/$(DOMAIN) \
-e "LINODE_V4_API_KEY=$(LINODE_TOKEN)" \
$(DOCKER_IMAGE) \
$(RENEW_CMD) $(RENEW_CMD)
############################################################################### ###############################################################################