Django and X-Accel

We have a Django app currently running in a VPS. The provider is shutting down early next year and our client is looking at their options.

  1. A different VPS provider and we simply copy paste the app and that’s it. Just like with the previous VPS, this means we are left with the OS updates and other maintenance.
  2. Kinsta. We would have to make our app compatible, but no more maintenance and a compartmentalized deployment of all the different tenants.

VPS would end up cheaper but Kinsta is attractive.
Our clients main concern is that the app, in addition to public static files, has a protected folder which contains sensitive documents which are meant to be accessed only by authorized users.

We accomplish this with an Nginx internal location and then check with a Django route for authorization before returning the document with X-Accel-Redirect.

We aren’t that familiar with building Dockerfiles so would it be possible with Kinsta?
Given how it would need to connect with a persistent storage location.

Hi @ZagnaH ! :wave: Welcome back to the Kinsta Community.

It would be possible to set this up on our Application Hosting, using a Dockerfile image deployment and Persistent Storage. The base image for your deployment would depend on your needs, but inside your Git repository, you could add an nginx.conf file (or some similar file, with your desired site configuration), and then include towards the end of the process, as part of your Dockerfile, something like

COPY nginx.conf /etc/nginx/nginx.conf

to push that custom configuration into the Nginx configuration.