Skip to content

Instantly share code, notes, and snippets.

@seanbradley
Forked from woodb/setup_flask_and_friends.sh
Created January 25, 2013 23:40
Show Gist options
  • Save seanbradley/4638907 to your computer and use it in GitHub Desktop.
Save seanbradley/4638907 to your computer and use it in GitHub Desktop.

Revisions

  1. @woodb woodb revised this gist Jul 8, 2012. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions setup_flask_and_friends.sh
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,11 @@
    #
    # See http://bit.ly/MeGwjD for more information!
    #
    # If you are forking this for your own custom configuration script, see the following other gists:
    # https://gist.github.com/3071737
    # https://gist.github.com/3071739
    # https://gist.github.com/3071740
    #
    sudo yum install python26 python26-devel make automake nginx gcc gcc-c++ python-setuptools git
    sudo easy_install pip
    sudo pip install uwsgi virtualenv
  2. @woodb woodb revised this gist Jul 8, 2012. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion setup_flask_and_friends.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    #!/bin/bash

    #
    # Shell script to automatically configure a new Flask, nginx and uWSGI based blog
    # on an Amazon EC2 instance.
    #
    # See http://bit.ly/MeGwjD for more information!
    #
    sudo yum install python26 python26-devel make automake nginx gcc gcc-c++ python-setuptools git
    sudo easy_install pip
    sudo pip install uwsgi virtualenv
  3. @woodb woodb revised this gist Jul 8, 2012. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions setup_flask_and_friends.sh
    Original file line number Diff line number Diff line change
    @@ -9,15 +9,19 @@ cd ~/myblog
    virtualenv venv
    . venv/bin/activate
    pip install Flask Flask-SQLAlchemy markdown
    python create_config.py
    cd ~
    sudo mkdir -p /var/www/run
    sudo cp -R myblog /var/www/blog
    sudo chown -R nginx:nginx /var/www/
    sudo mkdir -p /var/log/uwsgi
    sudo mkdir -p /etc/uwsgi/apps-available
    sudo mkdir -p /etc/uwsgi/apps-enabled
    sudo wget https://raw.github.com/gist/3071737/3f3a2a4a48285801a8df1e71aaff830276c035e6/uwsgi.conf /etc/init/uwsgi.conf
    sudo vim /etc/init/uwsgi.conf
    sudo wget https://raw.github.com/gist/3071739/c454ab48a8ba419bb943faf9272691810beeaf60/blog.ini /etc/uwsgi/apps-available/blog.ini
    sudo vim /etc/uwsgi/apps-available/blog.ini
    sudo ln -s /etc/uwsgi/apps-available/blog.ini /etc/uwsgi/apps-enabled/blog.ini
    sudo wget https://raw.github.com/gist/3071740/5d438fc01f105b917386f2ada2e7912f65b7ed17/default.conf /etc/nginx/conf.d/default.conf
    sudo vim /etc/nginx/conf.d/default.conf
    sudo service nginx start
  4. @woodb woodb created this gist Jul 8, 2012.
    23 changes: 23 additions & 0 deletions setup_flask_and_friends.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/bin/bash

    sudo yum install python26 python26-devel make automake nginx gcc gcc-c++ python-setuptools git
    sudo easy_install pip
    sudo pip install uwsgi virtualenv
    cd ~
    git clone https://github.com/orf/simple.git myblog
    cd ~/myblog
    virtualenv venv
    . venv/bin/activate
    pip install Flask Flask-SQLAlchemy markdown
    cd ~
    sudo mkdir -p /var/www/run
    sudo cp -R myblog /var/www/blog
    sudo chown -R nginx:nginx /var/www/
    sudo mkdir -p /var/log/uwsgi
    sudo mkdir -p /etc/uwsgi/apps-available
    sudo mkdir -p /etc/uwsgi/apps-enabled
    sudo vim /etc/init/uwsgi.conf
    sudo vim /etc/uwsgi/apps-available/blog.ini
    sudo ln -s /etc/uwsgi/apps-available/blog.ini /etc/uwsgi/apps-enabled/blog.ini
    sudo vim /etc/nginx/conf.d/default.conf
    sudo service nginx start