2017-11-28 12:29:12 +11:00
|
|
|
# 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.
|
|
|
|
|
2017-11-28 14:44:49 +11:00
|
|
|
Set up the Heroku app.
|
|
|
|
|
|
|
|
heroku git:remote -a your-app-12345
|
|
|
|
|
2017-11-28 12:29:12 +11:00
|
|
|
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.
|
|
|
|
|
2017-11-28 14:44:49 +11:00
|
|
|
Set environment variables.
|
|
|
|
|
|
|
|
heroku config:set EOSWEB_SETTINGS=/app/local_settings.py
|
|
|
|
|
2017-11-28 12:29:12 +11:00
|
|
|
Push the changes to the Heroku app.
|
|
|
|
|
|
|
|
git add .
|
|
|
|
git commit -m 'For Heroku'
|
|
|
|
git push heroku master
|
|
|
|
|
|
|
|
Access Eos at https://your-app-12345.herokuapp.com/.
|