Browse Source

Arrange custom scripts for running applications.

ansible-setup-and-deploy
decentral1se 3 years ago
parent
commit
5c56aeca09
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 6
      Pipfile
  2. 0
      scripts/__init__.py
  3. 4
      scripts/devserver.py
  4. 5
      scripts/devshell.py

6
Pipfile

@ -29,5 +29,7 @@ pytest = "*"
tox = "*"
[scripts]
dev = "python dev.py"
prod = "gunicorn --worker-class eventlet -w 1 wsgi:app"
devserver = "bash -c 'FLASK_APP=scripts/devserver.py flask run'"
devshell = "bash -c 'FLASK_APP=scripts/devshell.py flask shell'"
prodserver = "gunicorn --worker-class eventlet -w 1 wsgi:app"
prodshell = "bash -c 'FLASK_APP=wsgi.py flask shell'"

0
scripts/__init__.py

4
dev.py → scripts/devserver.py

@ -1,7 +1,7 @@
"""Expose a development application."""
"""Run a development application."""
from xppl.app import create_app
from xppl.socketio import socketio
from xppl.app import create_app
app = create_app('xppl.config.Development')

5
scripts/devshell.py

@ -0,0 +1,5 @@
"""Run a development shell."""
from xppl.app import create_app
app = create_app('xppl.config.Development')
Loading…
Cancel
Save