-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Allow passing clienthome as environment var #171
Conversation
@@ -1,6 +1,9 @@ | |||
%define INSTANCE /app | |||
instancehome $INSTANCE | |||
|
|||
%define CLIENTHOME $(CLIENT_HOME) | |||
clienthome $CLIENTHOME |
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.
Was CLIENT_HOME from docker-entrypoint.sh just ignored before?
Is it possible to do clienthome $(CLIENT_HOME)
without defining CLIENTHOME?
I think we should only merge this for 6.0.x if we make the same change for 6.1.x.
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.
Was CLIENT_HOME from docker-entrypoint.sh just ignored before?
it was used in zeo.conf (when ZEO configuration), but not in zope.conf, that's why I bring it also here, it will do no harm having it here too.
Is it possible to do
clienthome $(CLIENT_HOME)
without defining CLIENTHOME?
That's why in docker-entrypoint.sh
I set its value to be the one defined in the env var (if it exists). The only change is that now it is allowed to set its value through an environment var, beforehand it was hardcoded.
I think we should only merge this for 6.0.x if we make the same change for 6.1.x.
Yes, I just did the PR for 6.0.x but I will do it also for 6.1.x
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 see, it makes sense to keep it consistent with zeo.conf and relstorage.conf.
I will open new PRs from this repository itself to avoid errors when running CI. |
We use the plone-backend image together with the plone-zeo image in a docker-compose.yml file. We are not confident enought to use Relstorage 😉
We configure the /data folder as a volume and persist it to a given location in disk. We also configure the ZEO client to use the shared blobstorage.
In such scenario, we end up with a lot of folders in the /data directory named with hex characters. A new folder is created each time we deploy a new docker image. See the attached image:
Those folders only contain the
Z4.pid
file with the pid of the Zope process.I have traced this down to these lines, where the CLIENTHOME is defined in docker-entrypoint.sh
If we provide a way to override the CLIENTHOME using an environment var we could define it somewhere out of /data (such as
/app/var
or wherever) and this way I would get rid of all those files in the mounted/data
volume.Does it make sense to you?