diff --git a/bootstrap.sh b/bootstrap.sh index 70501f8..536b832 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -13,7 +13,7 @@ passwd -l root # Install necessary packages echo "------- Installing packages -------" -pacman -S --needed --noconfirm sudo wget tmux htop vim docker docker-compose git ufw +pacman -S --needed --noconfirm sudo wget tmux htop vim docker docker-compose git ufw certbot certbot-dns-digitalocean echo "------- Setting up SSH -------" # Remove old SSH keys in case running again @@ -52,6 +52,27 @@ chmod +x /app/gitea/gitea chown -R git /app/gitea/gitea chown -R git /var/lib/gitea +if [ $APP_ENV = "production" ] +then + echo "------- Enabling certbot service -------" + mkdir -p /root/.secret/certbot + tee /root/.secret/certbot/digitalocean.ini <