You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "This script should be run from the top of the microservices repo" >&2
exit 2
fi
source ./entrypoint_functions.sh
ensure_required_variables "MICROSERVICE"
# Validate MICROSERVICE is a safe directory name
if [[ ! "${MICROSERVICE}" =~ ^[a-zA-Z0-9_-]+$ ]]; then
echo "ERROR: MICROSERVICE must contain only alphanumeric characters, hyphens, and underscores" >&2
exit 2
fi
microservice_dir="$(pwd)/${MICROSERVICE}"
# Verify entrypoint.sh exists in target service
if [[ ! -e "${microservice_dir}/entrypoint.sh" ]]; then
echo "This script sees the MICROSERVICE environment variable set to \"${MICROSERVICE}\" but is unable to find the corresponding entrypoint script \"${microservice_dir}/entrypoint.sh\"" >&2
exit 2
fi
# Verify entrypoint.sh is executable
if [[ ! -x "${microservice_dir}/entrypoint.sh" ]]; then
echo "${microservice_dir}/entrypoint.sh is not executable" >&2