Re: Compiling/packing Django to one binary

2016-10-20 Thread GMail
> What if system libraries are not the same as yours, you're not shipping all > dependencies, including distribution libs as well? When making virtualenv relocatable I pass --always-copy argument, so all libs are copied. Well, most of them, I manually copy some that aren't (like libpython). As

Re: Compiling/packing Django to one binary

2016-10-20 Thread Jani Tiainen
On 20.10.2016 13:39, GMail wrote: How do you can make sure that you can install all the libs your Django app, or any dependencies you may have are installed correctly? I'm installing dependencies in virtualenv. How you do setup static file serving? I'm shipping Nginx binary and config

Re: Compiling/packing Django to one binary

2016-10-20 Thread GMail
> How do you can make sure that you can install all the libs your Django app, > or any dependencies you may have are installed correctly? > I'm installing dependencies in virtualenv. > How you do setup static file serving? > I'm shipping Nginx binary and config along with app. Static files

Re: Compiling/packing Django to one binary

2016-10-20 Thread Jani Tiainen
Hi, If that's truely the case that you don't control anything, deploying Django will be really a hard problem. How do you can make sure that you can install all the libs your Django app, or any dependencies you may have are installed correctly? How you do setup static file serving? How

Re: Compiling/packing Django to one binary

2016-10-19 Thread GMail
I'm not compiling libpq5, I'm just copying it to venv/lib so psycopg2 could work without dev postgres packages. And yes, it doesn't matter if I use virtualenv or not, this is just a workaround for this specific problem. This is going a bit off topic though =/ > On 19 Oct 2016, at 17:36,

Re: Compiling/packing Django to one binary

2016-10-19 Thread Antonis Christofides
Sorry, you say you need to set LD_LIBRARY_PATH because of libpq5 (I guess you are compiling it yourself). So far so good. But what does this have to do with virtualenv? You need to set LD_LIBRARY_PATH irrespective of whether you use virtualenv or not. Have I misunderstood something? On Wed,

Re: Compiling/packing Django to one binary

2016-10-19 Thread GMail
In fact I do have to use LD_LIBRARY_PATH. Mostly because of libpq5. And again, I have no control over production server, I don't even know in which directory my virtualenv will land. > On 19 Oct 2016, at 16:02, Avraham Serour wrote: > > using a virtualenv is common and

Re: Compiling/packing Django to one binary

2016-10-19 Thread Avraham Serour
using a virtualenv is common and suggested, but don't need to mess with LD_LIBRARY_PATH you can create the virtualenv in your home directory or the application directory and run the python executable from the virtualenv, no need to touch LD_LIBRARY_PATH On Wed, Oct 19, 2016 at 3:41 PM, GMail

Re: Compiling/packing Django to one binary

2016-10-19 Thread GMail
Thanks for replies! I'm aware of Docker solution, but it's not quite what I'm looking for. I don't have any control of a production server, I don't have sudo and I can't install any packages. It also concerns Docker, since it could be not installed. And yes, OS is always Ubuntu Linux in my case,

Re: Compiling/packing Django to one binary

2016-10-19 Thread Jani Tiainen
Hi, Like someone else already pointed out, Docker containers are quite powerful feature to do deterministic deployments to unix-like machines. Only pre-requirement is to have Docker running on target machine but otherwise you're free to build your containers as you wish. This also

Re: Compiling/packing Django to one binary

2016-10-19 Thread Antonis Christofides
> 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). > Hi, What do you know about the production server? Do you know the operating system? Can you become a superuser? If

Re: Compiling/packing Django to one binary

2016-10-18 Thread Asad Jibran Ahmed
Hi, While I haven't personally dealt with such a situation with my Django code, I have worked with people who had this issue (un-deterministic production servers). They used Docker to solve this issue. Essentially you're looking for deterministic deploys, and Docker is the first thing that jumps

Compiling/packing Django to one binary

2016-10-18 Thread Александр Христюхин
Hi! I would like to ask community about methods of shipping Django in production. 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