Skip to content

purge sessions from database at deployment

Borreguero Calvo, Jose requested to merge purge_sessions into next

Refs https://code.ornl.gov/sns-hfir-scse/reflectometry/reflectometry/-/issues/413

Work Done

  • custom manage-command sessions to purge sessions and identity file records from the database
  • run manage-command sessions at entrypoint

Test

We can force the LOCAL environment to only purge the sessions instead of flushing the database. Edit docker-entrypoint.sh and change this

# Flush (empty) all database records only for the develop (a.k.a LOCAL) environment
python3 $MANAGE_PY flush --no-input

to this:

python3 $MANAGE_py sessions --purge

After this, deploy LOCAL environment and test the app is served at address localhost

Edited by Borreguero Calvo, Jose

Merge request reports