Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/docker/docker/main/python-3.13.0-…
Browse files Browse the repository at this point in the history
…slim-bookworm
  • Loading branch information
ribalba authored Oct 15, 2024
2 parents 352e8d9 + d098fa1 commit be42374
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
gunicorn==23.0.0
psycopg[binary]==3.2.3
psycopg_pool==3.2.3
fastapi[standard]==0.115.0
fastapi[standard]==0.115.2
starlette>=0.35
uvicorn[standard]==0.31.1
pandas==2.2.3
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/helpers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ async function makeAPICall(path, values=null, force_authentication_token=null) {
options.headers['X-Authentication'] = force_authentication_token;
} else {
const authentication_token = localStorage.getItem('authentication_token');
if (force_authentication_token != null && force_authentication_token != '') {
options.headers['X-Authentication'] = force_authentication_token;
if (authentication_token != null && authentication_token != '') {
options.headers['X-Authentication'] = authentication_token;
}
}

Expand Down
14 changes: 11 additions & 3 deletions lib/install_shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function prepare_config() {
function setup_python() {
print_message "Setting up python venv"
if [[ $use_system_site_packages == true ]] ; then
python3 -m venv venv --system_site_packages
python3 -m venv venv --system-site-packages
else
python3 -m venv venv
fi
Expand Down Expand Up @@ -316,14 +316,17 @@ while getopts "p:a:m:nhtbisyrlc:k:" o; do
done

if [[ $ask_ssl == true ]] ; then
echo ""
read -p "Do you want to enable SSL for the API and frontend? (y/N) : " enable_ssl_input
if [[ "$enable_ssl_input" == "Y" || "$enable_ssl_input" == "y" ]] ; then
enable_ssl=true
if [[ -z $cert_key ]]; then
echo ""
read -p "Please type your file where your key is located. For instance /home/me/key.pem : " cert_key
fi
cp $cert_key docker/nginx/ssl/production.key
if [[ -z $cert_file ]]; then
echo ""
read -p "Please type your file where your certificate is located. For instance /home/me/cert.crt : " cert_file
fi
cp $cert_file docker/nginx/ssl/production.crt
Expand All @@ -334,12 +337,16 @@ fi


if [[ -z $api_url ]] ; then
read -p "Please enter the desired API endpoint URL: (default: http://api.green-coding.internal:9142): " api_url
echo ""
echo "Please enter the desired API endpoint URL"
read -p "Use port 9142 for local installs and no port for production to auto-use 80/443: (default: http://api.green-coding.internal:9142): " api_url
api_url=${api_url:-"http://api.green-coding.internal:9142"}
fi

if [[ -z $metrics_url ]] ; then
read -p "Please enter the desired metrics dashboard URL: (default: http://metrics.green-coding.internal:9142): " metrics_url
echo ""
echo "Please enter the desired metrics dashboard URL"
read -p "Use port 9142 for local installs and no port for production to auto-use 80/443: (default: http://metrics.green-coding.internal:9142): " metrics_url
metrics_url=${metrics_url:-"http://metrics.green-coding.internal:9142"}
fi

Expand All @@ -351,6 +358,7 @@ fi
default_password=${password_from_file:-$(generate_random_password 12)}

if [[ -z "$db_pw" ]] ; then
echo ""
read -sp "Please enter the new password to be set for the PostgreSQL DB (default: $default_password): " db_pw
echo "" # force a newline, because read -sp will consume it
db_pw=${db_pw:-"$default_password"}
Expand Down

0 comments on commit be42374

Please sign in to comment.