@@ -73,7 +73,6 @@ letsencrypt_acme() {
7373 declare desc=" perform actual ACME validation procedure"
7474 declare app=" $1 " acme_port=" $2 "
7575 local FAKE_NGINX_CONF=false
76- local config_dir
7776
7877 if [[ ! -f " $DOKKU_ROOT /$app /nginx.conf" ]]; then
7978 FAKE_NGINX_CONF=true
@@ -84,20 +83,21 @@ letsencrypt_acme() {
8483 dokku_log_info1 " Getting letsencrypt certificate for ${app} ..."
8584
8685 # read arguments from appropriate config file into the config array
87- config_dirs= " $( letsencrypt_configure_and_get_dir " $app " " $acme_port " ) "
88- host_config_dir= " $( echo " $config_dirs " | cut -d: -f1 ) "
89- container_config_dir =" $( echo " $config_dirs " | cut -d: -f2 ) "
90- read -r -a config < " $container_config_dir /config"
86+ local config_dir= $( letsencrypt_configure_and_get_dir " $app " " $acme_port " )
87+ local config_dir_in_pod= " /mnt/dokku/home/dokku/ $config_dir "
88+ local config_dir_on_host =" $DOKKU_HOST_ROOT / $config_dir "
89+ read -r -a config < " $config_dir_in_pod /config"
9190
9291 # run letsencrypt as a docker container using "certonly" mode
9392 # port 80 of the standalone webserver will be forwarded by the proxy
9493 set +e
9594 export DOKKU_UID=$( id -u)
9695 export DOKKU_GID=$( id -g)
9796 docker run --rm \
97+ " $PERMISSIONS_CALLS " \
9898 --user $DOKKU_UID :$DOKKU_GID \
9999 -p " $acme_port :$acme_port " \
100- -v " $host_config_dir :/certs" \
100+ -v " $config_dir_on_host :/certs" \
101101 " ${PLUGIN_IMAGE} :${PLUGIN_IMAGE_VERSION} " \
102102 " ${config[@]} " run | sed " s/^/ /"
103103
0 commit comments