I would like to ask community about methods of shipping Django in
I do have some limitations, one of which is I don't know what packages are
installed on production server (for example, postgres dev libraries or
specific version of python).
Right now my method is to create venv with specific version of Python, make
venv relocatable, copy missing libraries into venv/lib, pack it into
archive and ship to production servers.
On application launch server has to unpack archive and run it somewhat like
> $ LD_LIBRARY_PATH=venv/lib venv/bin/python venv/bin/gunicorn -c
> gunicorn.conf myapp.wsgi:application
In my case LD_LIBRARY_PATH is required for libpython and libpq (PostgreSQL
This does work, but I have to go through a lot of stuff.
What I want to do is pack my application with specific python and libraries
into one binary (on build server) and only ship this binary to production
server. So application launch will look somewhat like that:
> $ my-awesome-python-bin gunicorn -c gunicorn.conf myapp.wsgi:application
Or if I could go even further and describe some startup logic:
> def startup():
> args = argparser.parse()
> config = args.config
> gunicorn.server(config, myapp.wsgi, 'application').run()
> $ my-awesome-bin -c myapp.conf
Is there any way of doing that?
Or could you suggest any easier (well, more convenient) way of shipping
I did ask practically the same question on StackOverflow
weeks ago, but none of given answers provide simple solution for my
problem. I've tried nuitka, pyinstalled and cx_freeze with no success.
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.