-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enables PIXL DB to operate as a service separate from Orthanc Raw #593
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #593 +/- ##
=======================================
Coverage 87.41% 87.41%
=======================================
Files 76 76
Lines 3425 3425
=======================================
Hits 2994 2994
Misses 431 431 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking very nice!
I think the docs could do with updating in a couple of places:
- https://github.com/SAFEHR-data/PIXL/tree/main/cli#configuration
- https://github.com/SAFEHR-data/PIXL/tree/main/orthanc/orthanc-raw#step-1
And possibly some more places too. Which makes me wonder whether it would be worth describing all the environment variables in a single README rather than across the repo (as a separate PR)?
Also, if we use an external postgres instance, would we need to change how we handle alembic migrations? Currently we run them when the container is started, but I guess we'd need to apply them manually if postgres is running elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, thanks for getting this in 🎉 . Agree with Paul on the documentation places. Happy for you to merge once you've added that in (without another review) and resolved the other comments to your liking.
Currently we run them when the container is started, but I guess we'd need to apply them manually if postgres is running elsewhere?
I think its fine for us to still run migrations on imaging api going up, because it'll still need to check the migrations have happened anyway.
# Exposed ports | ||
HASHER_API_PORT= | ||
POSTGRES_PORT= | ||
POSTGRES_PIXL_DB_PORT= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth moving this elsewhere in the file as this port isn't necessarily what we're exposing it to (we can override this in the system test files, where we are exposing it).
POSTGRES_HOST=localhost | ||
POSTGRES_PORT=7001 | ||
POSTGRES_PIXL_DB_HOST=localhost | ||
POSTGRES_PIXL_DB_PORT=7001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about EXTERNAL_PIXL_DB_HOST
or CLI_PIXL_DB_HOST
etc?
@@ -29,7 +37,7 @@ RABBITMQ_ADMIN_PORT=7009 | |||
FTP_PORT=20021 | |||
|
|||
# PIXL Export API | |||
POSTGRES_HOST=localhost | |||
POSTGRES_PIXL_DB_HOST=localhost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it wasn't you but should this move? Feels like its not to do with the export api
test/docker-compose.yml
Outdated
POSTGRES_DB: ${PIXL_DB_NAME} | ||
PGTZ: ${TZ:-Europe/London} | ||
env_file: | ||
- ../docker/common.env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imagine you've seen but from CI: /home/runner/work/PIXL/docker/common.env: no such file or directory
. I'm guessing because we've set the context to be ../
then it can just be ./docker...
A note: my last commit removed the Two thoughts:
|
Yeah I think that's right - IIRC we have to do the test |
Description
Fixes #517:
Adds the means to create two postgres services. Previously, PIXL DB was used by both Orthanc Raw and for storing patient metadata.
Now it is possible to have separate databases for Orthanc Raw and PIXL DB. By default and in keeping with previous design, the root
./docker-compose.yml
brings up a single postgres service, shared by both Orthanc Raw and PIXL DB.With this PR,
test/docker-compose.yml
now contains a new postgres service demonstrating how to bring up a separate service for PIXL DB.Type of change
Please delete options accordingly to the description.
Suggested Checklist
main
branch.squash and merge