Skip to content
Snippets Groups Projects
Commit 5cc9f0b6 authored by Adam Parák's avatar Adam Parák 💬
Browse files

update README.md

parent 837f7a8e
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ Subrepos: ...@@ -12,7 +12,7 @@ Subrepos:
## How to run ## How to run
Install Node 18 LTS, Yarn, Python 3.8 Install Node 20 LTS, Yarn, Python 3.8
``` ```
# https://stackoverflow.com/questions/16773642/pull-git-submodules-after-cloning-project-from-github # https://stackoverflow.com/questions/16773642/pull-git-submodules-after-cloning-project-from-github
...@@ -25,7 +25,7 @@ poetry run python manage.py migrate ...@@ -25,7 +25,7 @@ poetry run python manage.py migrate
poetry run python manage.py createcachetable poetry run python manage.py createcachetable
cd .. cd ..
yarn --frozen-lockfile yarn
# run backend server on a known address, set it appopriately in src/config.ts and also in Backend KNOWN_HOSTS # run backend server on a known address, set it appopriately in src/config.ts and also in Backend KNOWN_HOSTS
# first run backend in different pane # first run backend in different pane
poetry run python manage.py runserver poetry run python manage.py runserver
...@@ -45,18 +45,29 @@ yarn build ...@@ -45,18 +45,29 @@ yarn build
## Docker deployment ## Docker deployment
Repository has a prepared Dockerfile which can be compiled accordingly Repository has a prepared Dockerfile which can be compiled accordingly.
The container requires to bind the Frontend to an instance of Backend.
This binding can be done by setting build arguments `VITE_HTTP_HOST` and `VITE_HTTP_PROTOCOL`
``` ```
docker build . -t inject-fe docker build . -t inject-fe --build-arg VITE_HTTP_HOST=be.inject.muni.cz --build-arg VITE_HTTP_PROTOCOL=http
``` ```
To run the Frontend, all it's needed is to run this command afterwards To run the Frontend, all it's needed is to run this command afterward
``` ```
docker run -p 80:80 inject-fe docker run -p 80:80 inject-fe
``` ```
In addition to setting the desired hostname at build-time, it's possible to change it at start-time as well.
This can be done by setting environment variables accordingly.
```
docker run -p 80:80 -e VITE_HTTP_HOST=secure-be.inject.muni.cz -e VITE_HTTP_PROTOCOL=https inject-fe
```
Please mind, that changing hostnames requires restart of the container if done during runtime.
## How to test the Monorepo ## How to test the Monorepo
It's expected that you run the backend server for now. It's expected that you run the backend server for now.
...@@ -78,6 +89,5 @@ The repo is littered with various README.md and GUIDELINES.md files that dictate ...@@ -78,6 +89,5 @@ The repo is littered with various README.md and GUIDELINES.md files that dictate
- Ahooks (implements common React Hooks for general usage) - Ahooks (implements common React Hooks for general usage)
- Generouted (allows for easier creation of router configuration) - Generouted (allows for easier creation of router configuration)
- GraphQL Codegen (allows for automatic typing of GraphQL queries) - GraphQL Codegen (allows for automatic typing of GraphQL queries)
- PostCSS (increases compatiblity of CSS styling)
- BlueprintJS (for UI) - BlueprintJS (for UI)
- emotion CSS (for CSS-in-JS and type control) - emotion CSS (for CSS-in-JS and type control)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment