From 8ed6b3fac3ffb26a73498d80051165ca09271661 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Tue, 28 Nov 2017 12:29:12 +1100 Subject: [PATCH] Data and instructions for Heroku --- .gitignore | 3 --- INSTALL.md | 53 +++++++++++++++++++++++++++++++++++++++ Procfile | 1 + local_settings.example.py | 2 ++ runtime.txt | 1 + 5 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 INSTALL.md create mode 100644 Procfile create mode 100644 runtime.txt diff --git a/.gitignore b/.gitignore index 13052cc..5640075 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,6 @@ __javascript__ __pycache__ refs -bower_components -eosjs.js -local_settings.py \#* .#* diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..136d122 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,53 @@ +# Deploying Eos + +## General + +Install the web dependencies. + + cd /path/to/Eos/eosweb/core + bower install + +Install the Python dependencies. (If doing this in a virtualenv, add the virtualenv path to *.gitignore*.) + + cd /path/to/Eos + pip install -r requirements.txt + +Build the JavaScript code. + + ./build_js.sh + +## Standalone + +Create *local_settings.py*. + + cd /path/to/Eos + cp local_settings{.example,}.py + +Modify *local_settings.py* as required. + +Launch the server. + + cd /path/to/Eos + FLASK_APP=eosweb EOSWEB_SETTINGS=$PWD/local_settings.py python -m flask run + +Access Eos at http://localhost:5000/. + +## Heroku + +Add a MongoDB (recommended) or PostgreSQL resource to your Heroku app. + +Create *local_settings.py*. + + cd /path/to/Eos + cp local_settings{.example,}.py + +Modify *local_settings.py* as required. Take special note of `BASE_URI` and the database information. + +Push the changes to the Heroku app. + + heroku git:remote -a your-app-12345 + git add . + git commit -m 'For Heroku' + git push heroku master + +Access Eos at https://your-app-12345.herokuapp.com/. diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..8193e0d --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: python -m flask run --host 0.0.0.0 --port $PORT diff --git a/local_settings.example.py b/local_settings.example.py index 4b14d19..8a6e798 100644 --- a/local_settings.example.py +++ b/local_settings.example.py @@ -1,5 +1,7 @@ ORG_NAME = 'Your Organisation Here' +BASE_URI = 'http://localhost:5000' + SECRET_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxx' AUTH_METHODS = [ diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..02d0df5 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.6.3