Created
February 11, 2013 11:07
-
-
Save miped/4753881 to your computer and use it in GitHub Desktop.
Example deployment of flask app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream qrr_app { | |
server 127.0.0.1:8080 fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name app.qrr.dk; | |
keepalive_timeout 5; | |
root /var/www/qrr/app/public; | |
location / { | |
try_files $uri @proxy_to_app; | |
} | |
location @proxy_to_app { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://qrr_app; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:qrr-app] | |
command=/home/ubuntu/.virtualenvs/qrr/bin/gunicorn -w 2 -b 127.0.0.1:8080 app:app | |
directory=/var/www/qrr/app | |
environment=ENV=env.Production | |
user=nobody | |
autostart=true | |
autorestart=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment