-
Notifications
You must be signed in to change notification settings - Fork 36
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
[Bug] relative bind mounts in stacks are deleted after deployment #68
Comments
For Git repo based stack, you have to delete the folder before reclone. You should use absolute path outside of repo directory as the mount, or just use a docker volume. Because of this, I figured it was safer actually for UI defined to also keep this behavior, so a user doesn't switch to git based stack after deploying and it ends up deleting their data at that point. It won't happen if user doesn't mount anything in this folder anyways. BUT I'm changing so UI defined compose file won't delete the stack folder after deploy. You could use a relative mount inside the folder in this case, starting from 1.14.1. But I don't think it is a good idea anyways. I just document this behavior here anyways and give my recommendation: https://komo.do/docs/docker-compose#using-bind-mounts. Files on host mode won't touch the deploy folder at all so you can do whatever you want in this case. |
I think deleting the repo is not ideal. It means some file references will always be dangling (to the compose.yaml, .env e.g.). and there are many projects that rely on binding local mounts. Would you consider an option to keep the repo in the stack dir and pull changes instead of recloning? |
While missing compose.yaml or .env are not an issue after deploy time, I suppose a very common usage pattern is to store config files in the repo as well, and mount them to the container. Theres definitely a lot more edge cases to figure out with Currently you can either:
But I will continue to consider the possibility of implementing a git pull option. |
UI based compose files / folder are NO LONGER deleted between deploys, 1.14.1 is out: https://github.com/mbecker20/komodo/releases/tag/v1.14.1 |
In 1.15, changes in Repo based stack will be pulled, and the folder won't be deleted anymore. |
The root stack directory in
komodo/stacks
is deleted immediately after deployment. This causes issues when adocker-compose.yaml
contains relative bind mounts. e.g, in this composetest_relative
fails after deployment:The text was updated successfully, but these errors were encountered: