3. Flask Documents
• Deploying to a Web Server
• http://flask.pocoo.org/docs/quickstart/#deploying-
to-a-web-server
• Deploying with Distribute
• http://flask.pocoo.org/docs/patterns/distribute/
• Deployment Options
• http://flask.pocoo.org/docs/deploying/
13년 7월 23일 화요일
4. Prepare
• gcc & python-dev
• sudo apt-get update
• sudo apt-get install build-essential python-dev
python-pip
• Make User (Don’t use ‘root’ user)
• sudo useradd -r -g www-data -s /bin/false uwsgi
• Make dir
• sudo mkdir -p /var/www/myapp
13년 7월 23일 화요일
18. Pitfall - Pass EnvVars
• nginx UWSGI_SETENV not work (Bug!)
• uwsgi_param UWSGI_SETENV
DJANGO_SETTINGS_MODULE=myapp.settings;
• Use uwsgi ‘env’
• <env>MYAPP_DEBUG=False</env>
13년 7월 23일 화요일