jdormit-infra/prod/gitea/packer/Makefile

40 lines
1.3 KiB
Makefile
Raw Normal View History

2021-01-25 22:56:15 +00:00
.PHONY: reissue-certs
packer-manifest.json: gitea.json \
scripts/dependencies.sh \
2021-01-25 22:56:15 +00:00
scripts/volume.sh \
files/gitea.service \
files/app.ini \
2021-01-25 22:56:15 +00:00
scripts/gitea.sh \
files/gitea-nginx.conf \
scripts/nginx.sh \
certbot/live/git.jeremydormitzer.com/fullchain.pem \
certbot/live/git.jeremydormitzer.com/privkey.pem
packer build gitea.json
files/app.ini: templates/app.ini.template
sigil -p -f templates/app.ini.template > files/app.ini
2021-01-25 22:56:15 +00:00
certbot/live/git.jeremydormitzer.com/fullchain.pem certbot/live/git.jeremydormitzer.com/privkey.pem &: tmp/do.ini
certbot certonly -n \
--agree-tos \
--email ${CERTBOT_EMAIL} \
--dns-digitalocean \
--dns-digitalocean-credentials tmp/do.ini \
--config-dir ./certbot \
--work-dir ./certbot \
--logs-dir ./certbot \
-d git.jeremydormitzer.com
tmp/do.ini: templates/do.ini.template tmp
sigil -p -f templates/do.ini.template > tmp/do.ini
chmod 600 tmp/do.ini
tmp:
mkdir tmp
reissue-certs:
rm -rf certbot
make