mirror of
https://github.com/viljarb0/site.git
synced 2026-08-12 00:57:54 +00:00
modified: .gitignore
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
This commit is contained in:
21
entrypoint-certbot.sh
Normal file
21
entrypoint-certbot.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user