Instantly share code, notes, and snippets.

What would you like to do?
Shell script to get setup with Flask, nginx and uWSGI on an Amazon EC2 Linux image
# Shell script to automatically configure a new Flask, nginx and uWSGI based blog
# on an Amazon EC2 instance.
# See for more information!
# If you are forking this for your own custom configuration script, see the following other gists:
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 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 wget /etc/init/uwsgi.conf
sudo vim /etc/init/uwsgi.conf
sudo wget /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 /etc/nginx/conf.d/default.conf
sudo vim /etc/nginx/conf.d/default.conf
sudo service nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment