Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
fixed the module name
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekziade committed Feb 8, 2017
1 parent f97d6dc commit 1e26e64
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docker/serviceweb.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SESSION_TYPE = filesystem
[common]
sqluri = sqlite:////app/projects.db
secret_key = some_secret
service_book = http://127.0.0.1:5000/api/api/
service_book = http://127.0.0.1:5001/api/

[oauth]
name = Servicebook-2
Expand Down
9 changes: 6 additions & 3 deletions docker/supervisor.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[program:app-uwsgi]
command = /usr/local/bin/uwsgi --ini /app/uwsgi.ini
[program:servicebook]
command = /usr/local/bin/uwsgi --ini /app/uwsgi-servicebook.ini

[program:nginx-app]
[program:serviceweb]
command = /usr/local/bin/uwsgi --ini /app/uwsgi-serviceweb.ini

[program:nginx]
command = /usr/sbin/nginx
9 changes: 9 additions & 0 deletions docker/uwsgi-servicebook.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[uwsgi]
debug = true
uid = 10001
gid = 10001
master = true
processes = 5
http-socket = :5001
vacuum = true
module = wsgiapp-book
2 changes: 1 addition & 1 deletion docker/uwsgi.ini → docker/uwsgi-serviceweb.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ http-socket = :5000
#chmod-socket = 660
#chown-socket = app:app
vacuum = true
module = wsgiapp
module = wsgiapp-web
13 changes: 13 additions & 0 deletions docker/wsgiapp-book.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import site
import sys
import os
import codecs
from servicebook.server import create_app


ini = os.path.join(os.path.dirname(__file__), 'serviceweb.ini')
application = create_app(ini_file=ini)


if __name__ == "__main__":
application.run(host='0.0.0.0')
5 changes: 0 additions & 5 deletions docker/wsgiapp.py → docker/wsgiapp-web.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
import sys
import os
import codecs
from werkzeug.wsgi import DispatcherMiddleware
from serviceweb.server import create_app
from servicebook.server import create_app as create_api


ini = os.path.join(os.path.dirname(__file__), 'serviceweb.ini')
application = create_app(ini_file=ini)
wsgi = application.wsgi_app
api = create_api(ini_file=ini)
application.wsgi_app = DispatcherMiddleware(wsgi, {'/api': api.wsgi_app})


if __name__ == "__main__":
Expand Down

0 comments on commit 1e26e64

Please sign in to comment.