vagrant-spk icon indicating copy to clipboard operation
vagrant-spk copied to clipboard

Should we move env folder of uwsgi stack out of /opt/app?

Open ocdtrekkie opened this issue 2 years ago • 3 comments

So, I've been working on updating the uwsgi stack, and on Windows, difficulty using symlinks on the shared folder caused me some issues using the virtualenv command in build.sh. I was able to get it to work by adding the --copies option, so instead of generating symlinks, it had duplicate copies of some files, python, python3, python3.9 all being the same file, for example instead of symlinked together. If someone's app calls multiple synonymous files, if we use --copies, we'd bloat the SPK, so I chose not to do that in the PR.

However, I am not sure there's a good case/reason for the env folder to be inside /opt/app in the first place: If we moved it elsewhere, this wouldn't be an issue for Windows vagrant-spk users. Is there an appropriate alternative location to put this?

ocdtrekkie avatar Sep 06 '22 03:09 ocdtrekkie

Quoting Jacob Weisz (2022-09-05 23:56:14)

However, I am not sure there's a good case/reason for the env folder to be inside /opt/app in the first place: If we moved it elsewhere, this wouldn't be an issue for Windows vagrant-spk users. Is there an appropriate alternative location to put this?

I agree moving it somewhere where it's not subject to host filesystem constraints is a good idea.

You can basically put it wherever. /opt is general for stuff that doesn't fit into the usual scheme. Maybe /opt/app-venv?

zenhack avatar Sep 06 '22 04:09 zenhack

I am good with that, and another subfolder of /opt/ was my first thought, but I didn't know if there was somewhere in particular that would feel conventional on a Linux system. I will go ahead and test that before I merge all of this together, and likely tag a vagrant-spk 1.2 release since this is all a pretty significant change.

ocdtrekkie avatar Sep 06 '22 04:09 ocdtrekkie

https://github.com/sandstorm-io/vagrant-spk/pull/331/commits/abaca565148fdf6dbdf0b1aeb72f4e58c23f7159 fixes this. Note that making directories in /opt/app hits a permission error, so I had to add a line to clobber that.

ocdtrekkie avatar Sep 06 '22 05:09 ocdtrekkie