charlesthomas/magpie

[Enhancement] A docker image for magpie

Erwyn opened this issue · 12 comments

Hello,

Just to signal that I'm working on a Docker image for magpie. It is not finished yet but it is on a good way. You can find the building Dockerfile on my repository http://github.com/Erwyn/magpie-docker.

Regards,

Hello again,

Got a question. From your answer to my issue #16 I builded the Docker Image. But the point is (sorry complete python noob in da place), what to run to lauch magpie? Do I have to run setup.py? How? Do I have to run it each time I make a modification to the source code?

Thanks for your answers!

I think I found out: I am supposed to do a python setup.py develop.

Please confirm me this is it. (Image almost ready)

Is the Docker Image intended for developing on magpie or for actually using it?

If it's for using it, then you can pip install magpie and then start it by running magpie.

It is intended for developing magpie. I'll propose another image to use it later.

The image is almost ready, the only missing part is an nginx proxy as magpie is only listening on localhost. I'll add a bit of documentation in the readme once it is really ready.

Don't worry about the nginx proxy. I was considering making the fact that it only listens on localhost configurable. Since I now have a reason to do it, I will work on that for the next release. In the meantime, this can be fixed like so:

in magpie/server.py line 53, change:
server.listen(options.port, 'localhost')
to:
server.listen(options.port)

Okay, so the image should be almost ready. I just have to add some documentation.

It will work on Linux, but for OSX or Windows some customizations like adding a second container with a samba server should be required.

For the nginx part, I do think that for deployment purpose it should only listen to localhost and nginx should be working as a proxy: this way nginx can handle SSL and so on while magpie only focus on what's his job.

Sorry guys, I got a lot of work lately. I'm back, gonna work on the last part of the docker image and then publish it!

@Erwyn It looks like someone created a docker setup as a separate repo:
https://github.com/billt2006/docker-magpie

Yes, but it is meant for production, not for developpement as I understand it.

Anyway, there is some interesting stuff in it, I'm gonna rewrite my docker image, thanks for the tip.

@Erwyn you are right, it is meant for production, but let me know if you have any questions.

Hey hello @billt2006

No question as of today. I ran some tests, I have a development image now published on erwyn/magpie-dev repository on docker which is really close to yours. But, I now remember why I was trying to do complex stuff at first: the problem is that each time you're willing to run a docker container, you need to have an internet connection as pip will pull all dependencies (in my image). I will fix it this evening, it only occurs to me while having my shower :P