Description
As already discussed earlier I'd like to suggest, that we remove the volume mount for the mig/
application folder from the production compose file.
The current situation is: during first start the migrid Docker container populates the mig/
directory with the version of the application that is built into the container.
If the container is rebuilt with a newer version and the whole setup is started, the mig/
folder inside the container get overmounted by the already existing volume. Thus we end up with a running Docker container tagged as a newer version which effectively runs the old version.
This is accepable behavior for a development environment where a user wants to change the application on-the-fly and see the results.
For a production environment a user should be able to see the running version by looking at the image tag of the containers.
Current solutions to avoid the version mismatch are: running make clean or even running make distclean and redeploy everything.
Both are meant to be used manual and cause downtime. The latter is also very slow.
Without the mig/ volume it would be possible to rebuild the container with a new version, then just rerun telling docker-compose to recreate the container. This is fast and intuitive and does not need extra steps in the automation (eg. Ansible).
So my suggestions is to remove the mig volume from all containers in the production template docker-compose file:
volumes:
...
- type: volume
source: mig
target: /home/mig/mig
Any thoughts and suggestions appreciated.