Generating an artifact for a Django project

I’ve been developing a Django REST application for a customer used to working with Java applications who finds it hard to depart from the standard of having a .jar executable artifact that “just works”. They asked me to provide them with a similar solution: they want to be able to turn a commit/version of the application into a portable and executable artifact that they can “just run”.

I suggested that Docker, on top of being the standard for deploying this type of application, would be a good solution but they said that for x reason they don’t want to use Docker. Despite thoroughly explaining to them that what they asked for isn’t really the standard or better way to deploy Python applications, they are pretty stubborn that they want this solution.

Looking at packages such as build, I see that they do not “pack” dependencies together with the generated .tar.gz package. What would be a good way to package everything for a Django project into a single “artifact” that can be deployed?

Thanks

There isn’t one. They’re asking for something that doesn’t currently exist. The Docker image is the closest to what they’re asking for. (Well, unless you get into system-specific solutions such as a Debian pkg or an Ubuntu “snap”.)

I have zero experience with it, but as a maintainer of an unrelated python project, I got a bug report from a user who was using pyinstaller to accomplish something along these lines.

I’ve only ever seen that (using pyinstaller) work correctly when using runserver to run the project, and that is an absolutely horrible idea for a production deployment.

1 Like

It is, but what can you answer to a “we don’t want to use Docker because.”?

I have several answers to that, depending upon the technical knowledge and skill of the person you’re talking to, along with the precise reason they’re giving.

The reason it hasn’t been done before now is that no one else cares about these issues that seem to concern them.

The customer isn’t always right, and part of your job is to convince them of that.

You have been (or should have been) hired because of your knowledge and expertise. If they are unwilling to learn from you, that’s on them, not you.

If they insist on doing things their way and don’t listen to reason, then give them a quote that the cost of implemening this is going to be $850,000 and take two years. To have it done in under a year is going to cost 50% more. (Something clearly absurd)