Skip to content

mwasilew2/nginx-uwsgi-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[TOC]

How do I get set up?

Work notes

notes

  • example42 modules are rubish
  • enabling repos
    • yum repolist all
    • yum-config-manager --enable epel

algorithm design

algorithm should be self-evaluating (it should check results and adapt), it should use data from the last 3 months to learn

great examples of Docker configurations

https://registry.hub.docker.com/u/lbracken/flask-uwsgi/

https://registry.hub.docker.com/u/apierleoni/flask-uwsgi/dockerfile/

https://registry.hub.docker.com/u/p0bailey/docker-flask/

nginx-uwsgi communication

set SELinux for nginx-uwsgi communication, use tcp sockets for nginx-uwsgi (cleaner design)

nginx config:

#!python


upstream uwsgicluster {
  # server unix:///tmp/uwsgi.sock;
  # server 192.168.1.235:3031;
  # server 10.0.0.17:3017;
  server 127.0.0.1:8080;
}


server {
  listen *:80;
  server_name           technical-analysis.sytes.net;

  set $maintenance "off";
  if ($maintenance = "on") {
      return 503;
  }
  # index  index.html index.htm index.php;

  access_log            /var/log/nginx/technical-analysis.sytes.net.access.log combined;
  error_log             /var/log/nginx/technical-analysis.sytes.net.error.log;

  location / {
    root      /usr/share/nginx/technical-analysis.sytes.net/;
    include uwsgi_params;
    uwsgi_pass uwsgicluster;
  }
}

uwsgi config:

http://vladikk.com/2013/09/12/serving-flask-with-nginx-on-ubuntu/

https://www.digitalocean.com/community/tutorials/how-to-deploy-python-wsgi-applications-using-uwsgi-web-server-with-nginx

http://blog.cnicodeme.com/how-to-setup-a-flask-project-with-uwsgi-and-nginx

http://blog.collabspot.com/2012/08/14/setting-up-nginx-uwsgi-python-ubuntu-12-04/

Changelog

moved from Trello to Bitbucket

  • why moved? Trello does not have place to put a lot of text. Authors say to use cards, but structure provided here (or github) much better reflects software projects. Besides everything is in one place, code, documentation, etc. Also, this is how shared projects are being built so it's better use industry standards.
  • wiki on bitbucket is super basic which is very annoying, e.g. no table of contents containing all pages (only for Creole)
  • wiki is not stored together with other files. Move wiki to Readme, don't use masters as production. Instead create branch production - masters will be merged to it to have a clean workflow

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published