# clone repo
git clone [email protected]:Pratilipi/python-gunicorn-bottle-skeleton.git
# create a new service
mv python-gunicorn-bottle-skeleton <<ecs-service-name>>
# change dir
cd <<ecs-service-name>>
# setup nginx
cp <<ecs-service-name>>/prerequisite/service.nginx /etc/nginx/sites-available/service
ln -s /etc/nginx/sites-available/service /etc/nginx/sites-enabled/
# setup virtualenv
virtualenv .venv
. .venv/bin/activate
# install requirments
pip install -r requirements.txt
# set db config
export MASTER_DB_ENDPOINT_RW=localhost
export MASTER_DB_PORT=3306
export MASTER_MYSQL_DB_USERNAME=root
export MASTER_MYSQL_DB_PASSWORD=root
# run gunicorn
gunicorn -c gunicorn_conf.py --reload wsgi
# check if service is running
curl -X GET http://localhost:8100/health
response : {"state": "healthy"}
# check if db connection is working
curl -X GET http://localhost:8100/pingdb
response : {"message": "2018-08-06 17:50:16"}
-
Notifications
You must be signed in to change notification settings - Fork 0
Pratilipi/python-gunicorn-bottle-skeleton
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Skeleton for Python2.7 + Gunicorn19.7 + Bottle0.12
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published