Hi. We are developing a complete Docker-Image for our customer using Plone 5. It is using RelStorage with an Oracle database located in their infrastructure.
After we created a new version of our add-ons we create the docker image and the database remains unchanged. Now it can happen that we have to create a new index or metadata attribute in the catalog for the new version which is used directly by some templates. When the newly created container is started this template runs into an error because nobody clicked "Reinstall" in portal_quickinstaller to create the missing metadata or index in the catalog. How could I check what the current version of our add-on in the database is and if I have to do a quickinstall before doing anything else and then run it from bash?
It should work somehow like this:
- docker run our-plone ....
- run.sh inside the docker container gets executed
- run.sh checks what the version of our add-on in the current database is.
- run.sh starts the instance.
- run.sh decides if it has to run quickinstall and does it when necessary.
- All new catalog indexes and metadata are now available. Plone can be used normally.
- run.sh waits until the instance dies.