Fix letsencrypt auto-renew.
This commit is contained in:
1 parent
3406c622c5
commit
54b640aef0
7 files changed
+103
-19
No files matched your search
@@ -9,9 +9,15 @@ DATA_ROOT="$DOKKU_LIB_ROOT/data/google-auth"
|
||||
|
||||
mkdir -p "$DATA_ROOT/global" "$DATA_ROOT/apps"
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "$PLUGIN_DIR/functions"
|
||||
|
||||
if command -v docker >/dev/null 2>&1; then
|
||||
echo "-----> Building dokku-google-auth service image (first build can take a few minutes)"
|
||||
docker image build -t dokku-google-auth:latest "$PLUGIN_DIR"
|
||||
# Build through fn-ga-build-image rather than calling docker directly, so the
|
||||
# image carries the source-hash label. An unlabelled image reads as stale
|
||||
# forever: every service start would rebuild it, and the report would claim
|
||||
# the binary is older than the plugin right after an upgrade installed it.
|
||||
fn-ga-build-image false
|
||||
# Pick up the new image if the service is already running. This goes through
|
||||
# fn-ga-service-start rather than its own `docker run` so an upgrade always
|
||||
# rewrites service.env first: recreating the container from the file an older
|
||||
@@ -20,8 +26,6 @@ if command -v docker >/dev/null 2>&1; then
|
||||
# access list and fall back to the global one.
|
||||
if [[ "$(docker container inspect -f '{{.State.Running}}' dokku-google-auth 2>/dev/null)" == "true" ]]; then
|
||||
echo "-----> Restarting google-auth service with the new image"
|
||||
# shellcheck disable=SC1091
|
||||
source "$PLUGIN_DIR/functions"
|
||||
if fn-ga-configured; then
|
||||
fn-ga-service-start
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user