Skip to content

Commit

Permalink
gunicorn works
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Risch committed Aug 30, 2018
1 parent 09b9f5a commit 9feac1d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ services:
- "2222:22"
volumes:
- ~/.ssh/id_rsa.pub:/home/ubuntu/.ssh/authorized_keys
- ./nginx/conf:/etc/nginx/conf
- ./nginx/web:/var/www/html
Binary file added nginx/web/app.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion nginx/web/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from myproject import app
from app import app

if __name__ == "__main__":
app.run()
Binary file added nginx/web/wsgi.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions playbook.retry
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
127.0.0.1
9 changes: 7 additions & 2 deletions playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
remote_user: ubuntu
become: yes
tasks:

- name: Install the packages
apt:
name: ["python-pip", "python-dev", "nginx", "gunicorn"]
state: present
- name: Copy NGINX
copy:
src: ./nginx/conf/default
dest: /etc/nginx/sites-available/
- name: Ensure NGINX is running
service:
name: nginx
Expand All @@ -16,6 +21,6 @@
name: flask
state: present
- name: Spinup Gunicorn
gunicorn:
app: 'app'
command: gunicorn --daemon --bind 0.0.0.0:5000 wsgi:app
args:
chdir: '/var/www/html'

0 comments on commit 9feac1d

Please sign in to comment.