mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 19:21:31 +00:00
Update README.md
This commit is contained in:
parent
491bbe5df6
commit
7ba33cae07
33
README.md
33
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 <id>` 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.
|
||||
|
Loading…
Reference in New Issue
Block a user