mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 02:57:18 +00:00
Write documentation on building & running
This commit is contained in:
parent
9509ea88e1
commit
f72b411106
27
README.md
27
README.md
@ -30,4 +30,29 @@ This will set up a special version of `test-tutorial-framework` just for you:
|
||||
- the latest frontend is included in `solvable/frontend` with dependencies installed
|
||||
- `solvable/Dockerfile` is pinned to use the latest TFW baseimage
|
||||
|
||||
After this, you can run use the `hack/tfw.sh` script to build and run your copy (just call it without any arguments to see usage information).
|
||||
## Building & running
|
||||
|
||||
### Automated
|
||||
|
||||
Our magical bash script `hack/tfw.sh` can handle everything for you. Just run it without any arguments to see usage information.
|
||||
|
||||
It is advisable to run the frontend locally while developing to avoid really looooong build times. The `hack/tfw.sh` script handles this for you automagically.
|
||||
|
||||
### Doing it manually
|
||||
|
||||
In case you **must** do it for some reason you can build & run manually.
|
||||
Note that this is relatively painful and you should use the `hack/tfw.sh` script when possible.
|
||||
|
||||
Building without frontend – execute from project root:
|
||||
|
||||
`docker build -t test-tutorial-framework -f solvable/Dockerfile --build-arg BUILD_CONTEXT=solvable --build-arg NOFRONTEND=1 .`
|
||||
|
||||
This will create a Docker image without the frontend, which you can run locally. For procudtion builds exclude the argument `--build-arg NOFRONTEND=1` to include a frontend instance.
|
||||
|
||||
Running – execute:
|
||||
|
||||
`docker run --rm -p 8888:8888 -e AVATAO_SECRET=secret test-tutorial-framework`
|
||||
|
||||
In case of a frontendless build (with `--build-arg NOFRONTEND=1`) you will need to run `yarn start` from the `solvable/frontend` directory as well. This will serve the frontend on `http://localhost:4200`.
|
||||
|
||||
If you've created a production build (without `--build-arg NOFRONTEND=1`) you don't have to run the frontend locally and you can access the challenge on `http://localhost:8888`.
|
||||
|
Loading…
Reference in New Issue
Block a user