support SHOKKU_CERT for manual TLS setup

This commit is contained in:
Kamesuta
2025-04-07 02:40:03 +09:00
parent 09a3bd0c91
commit f157e6e820

View File

@@ -62,8 +62,13 @@ create-shokku-app() {
echo "==> deploying" echo "==> deploying"
dokku config:unset shokku DOKKU_SKIP_DEPLOY &>/dev/null dokku config:unset shokku DOKKU_SKIP_DEPLOY &>/dev/null
if [ -z "$SHOKKU_CERT" ]; then
echo "==> enabling letsencrypt" echo "==> enabling letsencrypt"
dokku letsencrypt:enable shokku &>/dev/null dokku letsencrypt:enable shokku &>/dev/null
else
echo "==> adding certificate from SHOKKU_CERT"
dokku certs:add shokku < "$SHOKKU_CERT"
fi
} }
main() { main() {
@@ -77,10 +82,12 @@ main() {
exit 1 exit 1
fi fi
if [ -z "$SHOKKU_CERT" ]; then
if ! dokku plugin:installed letsencrypt; then if ! dokku plugin:installed letsencrypt; then
echo "Please setup letsencrypt using the instructions at https://dokku.com/docs/deployment/application-deployment/#setting-up-ssl" 1>&2 echo "Please setup letsencrypt using the instructions at https://dokku.com/docs/deployment/application-deployment/#setting-up-ssl" 1>&2
exit 1 exit 1
fi fi
fi
for plugin in redis postgres mongo mysql; do for plugin in redis postgres mongo mysql; do
if ! dokku plugin:installed $plugin; then if ! dokku plugin:installed $plugin; then