Before there was Docker and Kubernetes I used to run hundreds of web sites on a single server by being disciplined about where files go, how database connections are configured, etc. I still do.
I like to run my code in containers (also during development), although your approach ain’t broken.