fix(service_create_container): using SERVICE_ROOT instead of SERVICE_HOST_ROOT when creating the ssl certs
Since the script create_ssl_certs.sh is executed from inside the container, the directory is not the host one, but the container one.
This commit is contained in:
@@ -149,7 +149,7 @@ service_create_container() {
|
||||
|
||||
dokku_log_verbose_quiet "Securing connection to database"
|
||||
service_pause "$SERVICE" >/dev/null
|
||||
"$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/scripts/create_ssl_certs.sh" "$SERVICE_HOST_ROOT" &>/dev/null
|
||||
"$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/scripts/create_ssl_certs.sh" "$SERVICE_ROOT" &>/dev/null
|
||||
"$DOCKER_BIN" container run --rm -i -v "$SERVICE_HOST_ROOT/data:/var/lib/postgresql/data" -v "$SERVICE_HOST_ROOT/certs:/var/lib/postgresql/certs" "$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION" bash -s <"$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/scripts/enable_ssl.sh" &>/dev/null
|
||||
rm -rf "$SERVICE_HOST_ROOT/certs"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
postgres_service_dir="$1"
|
||||
|
||||
cd "$postgres_service_dir"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd /var/lib/postgresql/data
|
||||
|
||||
cp ../certs/* .
|
||||
|
||||
Reference in New Issue
Block a user