From 7ba33cae077127f58bf126f168a4026d8b3bbdd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 9 Mar 2018 11:14:00 +0100 Subject: [PATCH] Update README.md --- README.md | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 00cdfbe..eb734a1 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,21 @@ Tutorial Framework ================== -## Frontend +## Building and running with magic starter -Place an `index.html` and related static files in `src/frontend/dist`, the web server will serve them properly. +Execute the `tfw_magic_start.sh` script and it will automagically run a backend instance in Docker and serve the Angular frontend locally. + +This requires the `tutorial-framework-wip` and `tutorial-framework-ng` repositories to have a common parent folder. ## Building and running with Docker -Simply issue `docker build .` in the root of the project. The first build could take a while as it's compiling a fresh -Python package from source. Subsequent builds can reuse this layer, so their execution time is significantly shorter. +Simply issue `docker build -t tfw .` in the project root. The first build could take a while as it's compiling a fresh +Python package from source. -Run with `docker run -p 8888:8888 ` to bind the container's port to localhost. +Run with `docker run --rm -p 8888:8888 -e AVATAO_SECRET=secret tfw`. -## Running locally +Running locally is possible with lots of pain involved, so this is no longer officially supported. -_This will probably barf at the moment._ +## Frontend -Create a new virtualenv, preferably with [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io). Install the -dependencies with `pip install tornado pyzmq transitions`. If using virtualenvwrapper, issue `add2virtualenv lib` from -the project root to add the local libraries to the virtualenv's PYTHONPATH. - -To start the project issue -``` -cd src/app/ -python app.py -``` -in one terminal, and -``` -cd src/components/ -python event_handler_main.py -``` -in another. Prepend the python commands with `PYTHONPATH="../../lib/"` if the folder weren't added to the PYTHONPATH -permanently. +Place an `index.html` and related static files in `src/frontend/dist`, the web server will serve them.