I dropped a site today and now bench keeps looking for the site. For example, if I execute bench migrate I receive an error Site <dropped site> does not exist!. I cannot for the life of me figure out why bench still expects to see the site. I have tried to force the drop. I have reinstalled and dropped the site again, clear the cache, etc. but bench stil expects to see the dropped site.
Are you in VM, docker or frappe cloud?
Docker
What I am suspecting: -
Many bench commands (get-app, build, havn’t tried “drop” yet) do not work inside docker as the volume is non-persistent and the image is immutable
If you want to have multi-app multi-site use
If you want to touch core code (and use bench build) use: -
Best of luck
Volumes can and are made persistent depending on the setup.
Does bench need to be made aware of where it sits? (Maybe this could be done via ENV variables, or another mechanisms, like: site-config / common-site-config / docker-instance-config)
Or is there a need to create an “outer-bench” which is able to enter containers and work there according to the setup it also reads? Similarly to the above, this could be the same bench with “looking into container composition/orchestration” powers.
There seems to be a mismatch of bench vs. actual setup. Said another way, bench doesn’t seem to really fit any more in the modern and recommended production setups. This confuses users, often the respective scopes are not clear.
bench definitely works in the environment. That is not the issue. I can create sites just fine. I have even dropped sites before with no issue. But since the last time I dropped a site bench has been telling me the site is missing. It is a very odd behavior since it must be caching the site’s existence somewhere.
NM, I figured it out. common_site_config.json had the dropped site as the default site.