Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve [Bug]: Duplicate setting up of custom CA certificates #32417 #36871

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions deploy/docker/fs/opt/appsmith/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,34 +299,6 @@ is_empty_directory() {
[[ -d $1 && -z "$(ls -A "$1")" ]]
}

check_setup_custom_ca_certificates() {
# old, deprecated, should be removed.
local stacks_ca_certs_path
stacks_ca_certs_path="$stacks_path/ca-certs"

local container_ca_certs_path
container_ca_certs_path="/usr/local/share/ca-certificates"

if [[ -d $stacks_ca_certs_path ]]; then
if [[ ! -L $container_ca_certs_path ]]; then
if is_empty_directory "$container_ca_certs_path"; then
rmdir -v "$container_ca_certs_path"
else
tlog "The 'ca-certificates' directory inside the container is not empty. Please clear it and restart to use certs from 'stacks/ca-certs' directory." >&2
return
fi
fi

ln --verbose --force --symbolic --no-target-directory "$stacks_ca_certs_path" "$container_ca_certs_path"

elif [[ ! -e $container_ca_certs_path ]]; then
rm -vf "$container_ca_certs_path" # If it exists as a broken symlink, this will be needed.
mkdir -v "$container_ca_certs_path"

fi

update-ca-certificates --fresh
}

setup-custom-ca-certificates() (
local stacks_ca_certs_path="$stacks_path/ca-certs"
Expand Down Expand Up @@ -520,7 +492,7 @@ else
export HOSTNAME="heroku_dyno"
fi

check_setup_custom_ca_certificates

setup-custom-ca-certificates

check_redis_compatible_page_size
Expand Down
Loading