Skip to content

WebsimDeploy

mushy mato edited this page Sep 21, 2020 · 4 revisions

The websim is hosted at https://www.pythonanywhere.com/, the free tier is sufficient.

Setting up the repo

Clone dl and then clone <yourusername>.github.io to /dl/www (for images), wwwsrc is not needed.

Setting up the Flask API

The API is contained in /app/app.py, follow instructions here: https://help.pythonanywhere.com/pages/Flask/ then modify the .bashrc with this line:

export ROOT_DIR=/dir/to/your/dl

Setting up the webapp

Create a new webapp on pythonanywhere, then under Static files, add the following paths:

URL Directory
/dl-sim/ /dir/to/your/dl/www/dl-sim/
/ui/ /dir/to/your/dl/app/ui/

Then, edit APP_URL in dl/app/ui/dl_simc.js to point to the base URL of your account.

Updating the site

First pull any new changes in dl, then pull www if new images have been added. After that, restart the web app.

Clone this wiki locally