roundcube / roundcubemail-docker

Resources to build Docker images for Roundcube Webmail
278 stars 126 forks source link

How does this image handle updates? #58

Closed marcelklehr closed 5 years ago

marcelklehr commented 5 years ago

Hey,

I was wondering whether this image offers any way to update roundcube?

thomascube commented 5 years ago

New images (tags) are created and pushed to docker hub for Roundcube releases.

marcelklehr commented 5 years ago

So, when I pull the new release roundcube will be updated automatically, or do I have to do anything else?

thomascube commented 5 years ago

You just pull the new docker image, that's all.

madmath03 commented 5 years ago

@marcelklehr The source code of RoundCube will be updated automatically when pull a new docker image, but if there are any database updates, you will have to perform them manually. Is that what you had in mind ?

@thomascube Do you think we could / should execute updatedb.sh through the entrypoint to automatically update the DB ?

thomascube commented 5 years ago

@madmath03 updatedb.sh is executed when config/config.inc.php is created. That is IMO the case when you update and restart a docker container. In case the document root is stored on a mounted volume, upgrading needs to be done manually anyway.

madmath03 commented 5 years ago

@thomascube Well, that's what I was wondering when reading this issue : shouldn't we add a mechanism to trigger the update no matter if the document root is mounted on a volume or not ?

It does not have to be the default behavior, we could add a variable env to trigger this (ROUNDCUBEMAIL_DB_UPDATE=TRUE), and then only execute the update if the sources at /usr/src/roundcubemail are more recent than the document root (compare CHANGELOG maybe). What do you think ? Bad idea ?

marcelklehr commented 5 years ago

This is what I had in mind, indeed. Nextcloud's docker image does something similar which is quite satisfying.

thomascube commented 5 years ago

@madmath03 Such a mechanism could indeed make sense. However, that should include updating the Roundcube sources as well if they're on a shared volume. Otherwise updating the image has no effect and does not load the contained version of Roundcube. The entire update process can be done by calling /usr/src/roundcubemail/bin/installto.sh . which already includes a call to updatedb.sh. Anyway, the use of a shared volume as document root is not encouraged and not documented. Not sure if that's worth the effort.

ckristo commented 4 years ago

@madmath03 ... Anyway, the use of a shared volume as document root is not encouraged and not documented. Not sure if that's worth the effort.

I guess this does not apply for the FPM image, since you need to share the “source” - specifically the static assets like CSS, JS or image files - with some web server residing in a different container. As far as I know, the Docker way of achieving that is using (named) volumes and mount them in both containers. Or do I miss something here?