Skip to content

Commit

Permalink
Add running of migrations back to GUI entrypoint.
Browse files Browse the repository at this point in the history
Making sure to put it after lines that export the SQL_PASSWORD as
needed.
  • Loading branch information
robertbartel authored and christophertubbs committed Sep 6, 2024
1 parent 5f7529a commit 59d3f89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/nwm_gui/app_server/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ echo "Starting dmod app"
#python manage.py migrate
#########

# Execute the migration scripts on the designated database
#python manage.py migrate

#Extract the DB secrets into correct ENV variables
POSTGRES_SECRET_FILE="/run/secrets/${DOCKER_SECRET_POSTGRES_PASS:?}"
export SQL_PASSWORD="$(cat ${POSTGRES_SECRET_FILE})"

# Execute the migration scripts on the designated database
python manage.py migrate

# Handle for debugging when appropriate
if [ "$(echo "${PYCHARM_REMOTE_DEBUG_ACTIVE:-false}" | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]')" == "true" ]; then
# Set the timeout to longer when debugging
Expand Down

0 comments on commit 59d3f89

Please sign in to comment.