Websites and services usually need a dev or testing environment separate from the "production" environment. At my job, we have the dev environment on a separate server. But for my own website, I don't want a second server, so for the longest time I've had my paladin config starting multiple backend instances on the same server connecting to Nginx over different sockets so they're on different subdomains.
The first version of this setup, back when I used Django, involved the dev server code being in the repo alongside the prod server code, and listed in a
.gitignore, but that had the issue that I couldn't properly use
git diff. If I didn't
gitignore it, I would have the same comitted in two places. It sucked, and the setup led to this disaster.
So now after moving to FastAPI and SQLAlchemy, I'm trying a new setup where I check out the repository in two places on the server,
~/dev. But there's still an issue - the paladin config! I need to have only one paladin config, so for this setup to work, the repo would have to be vendor a config file that assumes the repo is checked out in two places. Yuck.
Have you run into a situation like this? How did you solve it?