Skip to content

Commit

Permalink
multiple optimizations based on recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith committed Jan 26, 2025
1 parent 5016c7b commit 084d114
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions backend/ciso_assistant/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ def set_ciso_assistant_url(_, __, event_dict):
"PASSWORD": os.environ["POSTGRES_PASSWORD"],
"HOST": os.environ["DB_HOST"],
"PORT": os.environ.get("DB_PORT", "5432"),
"CONN_MAX_AGE": os.environ.get("CONN_MAX_AGE", 300),
}
}
else:
Expand Down
4 changes: 2 additions & 2 deletions backend/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi

while ! python manage.py showmigrations iam >/dev/null; do
echo "database not ready; waiting"
sleep 20
sleep 15
done

poetry run python manage.py migrate --settings="${DJANGO_SETTINGS_MODULE}"
Expand All @@ -25,4 +25,4 @@ if [ -n "$DJANGO_SUPERUSER_EMAIL" ]; then
poetry run python manage.py createsuperuser --noinput --settings="${DJANGO_SETTINGS_MODULE}"
fi

exec gunicorn --chdir ciso_assistant --bind :8000 --timeout 300 --env RUN_MAIN=true ciso_assistant.wsgi:application
exec gunicorn --chdir ciso_assistant --bind :8000 --timeout 100 --keep-alive 30 --workers=3 --env RUN_MAIN=true ciso_assistant.wsgi:application

0 comments on commit 084d114

Please sign in to comment.