Skip to content

[hf] fix bug causing psql sessions not to persist changes

  • BUG: when running either ./bin/prod/psql or ./bin/dev/psql while the app is running, any changes would not persist in the app's version of the db, making it necessary to shut down the app to make any changes in psql. (particularly annoying when trying to write to prod db to make hotfixes!)
  • CAUSE: because we were using docker exec -it instead of docker-compose exec db in both psql scripts, we were failing to mount the data dir to which the docker-compose versions are persisting data. guaranteed to be using a container with an emph
  • FIX: use docker-compose to run exec command in both cases when db container is already running and when we need to start it b/c it is not running

side-effects:

  • as a convenience, provide both make dev.psql and make prod.psql to invoke the 2 psql scripts
Edited by aguestuser

Merge request reports