orthanc-server / orthanc-builder

Repo used to build osimis/orthanc docker images, windows installers and OSX packages
GNU Affero General Public License v3.0
26 stars 12 forks source link

Run BEFORE_ORTHANC_STARTUP_SCRIPT first thing in the ENTRYPOINT #10

Closed andgineer closed 1 year ago

andgineer commented 1 year ago

Trying to fix https://github.com/orthanc-server/orthanc-builder/issues/9 I discovered that BEFORE_ORTHANC_STARTUP_SCRIPT is launched after config files processing.

So we cannot change configs in this script because they are already copied to cumulative config with 'secret' name /tmp/orthanc.json which is passed in CMD but is not accessible from BEFORE_ORTHANC_STARTUP_SCRIPT

May be we should 1) Launch the script as first thing 2) Do not hardcode /tmp/orthanc.json in generateConfiguration.py but pass it to the python script as parameter like python3 generateConfiguration.py "$@"

amazy commented 1 year ago

Some people might want to analyze the content of the generated config file at that time so we can not change it.

We might define another custom script that would be called before the config file generation but don't forget anyone can have its own entrypoint/cmd as well so I don't think it is necessary.

andgineer commented 1 year ago

Good point, thank you for clarification. My problem - I want to do changes in our config because of the problem https://github.com/orthanc-server/orthanc-builder/issues/9#issuecomment-1590820203 But as I understand I cannot replace /tmp/orthanc.json with our config - after that Orthanc cannot connect to Postgres. I do not have a clear understanding of why though :( If I just place the same config into /etc/orthanc/ it works. If I replace /tmp/orthanc.json it fail to connect to DB

amazy commented 1 year ago

/etc/orthanc is where you should put your configuration file as explained in the documentation