Managing Gunicorn with Flask on Linux

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Posts: 42
Joined: Thu Oct 08, 2015 4:56 am UTC

Managing Gunicorn with Flask on Linux

Postby jacques01 » Thu Jul 21, 2016 3:21 am UTC

I am running a Python Flask Restful web service. For the web container, I am using Gunicorn.

I want to be able to push updates to it by simply doing a "git pull origin master".

The problem is that my web service has parts in separate places.

1) I have a virtualenv / directory for the web app called myproject.
Inside it is:
--> which Gunicorn runs (it does from my-git-project.foobar import app)
--> my-git-project = the git repo that contains the code
--> virtualenv

2) I have a /etc/init.d/myproject.conf script that manages Gunicorn. I frequently update this as I learn how to best design the Gunicorn service to tailor my needs.

How do I structure this in a simple way? I hate the way I have it now.

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 8 guests