sandstorm-io / vagrant-spk

Packaging tool for Sandstorm, a self-hosting platform for web apps!
Apache License 2.0
55 stars 29 forks source link

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

Open ocdtrekkie opened 2 years ago

ocdtrekkie commented 2 years ago

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?

zenhack commented 2 years ago

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?

ocdtrekkie commented 2 years ago

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 commented 2 years ago

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.