mirror of
https://github.com/viljarb0/site.git
synced 2026-08-12 00:57:54 +00:00
new file: Dockerfile.certbot new file: Dockerfile.nginx new file: Makefile new file: compose.certbot.yml new file: docker-compose.yml new file: entrypoint-certbot.sh new file: entrypoint-nginx.sh new file: nginx-gitea.conf.template new file: nginx.conf.template
22 lines
451 B
Bash
22 lines
451 B
Bash
#!/usr/bin/env sh
|
|
set -e
|
|
|
|
if [ -z "$DOMAIN" ] || [ -z "$EMAIL" ]; then
|
|
echo "Skipping certificate (development mode)"
|
|
exit 0
|
|
fi
|
|
|
|
# Build domain list for cert (DOMAIN + optional GITEA_DOMAIN)
|
|
DOMAINS="-d $DOMAIN"
|
|
if [ -n "$GITEA_DOMAIN" ]; then
|
|
DOMAINS="$DOMAINS -d $GITEA_DOMAIN"
|
|
fi
|
|
|
|
# get/renew cert
|
|
certbot certonly --standalone \
|
|
$DOMAINS \
|
|
--email "$EMAIL" \
|
|
--agree-tos \
|
|
--non-interactive \
|
|
--keep-until-expiring
|