Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
INJECT
frontend
Commits
5cc9f0b6
There was an error fetching the commit references. Please try again later.
Commit
5cc9f0b6
authored
1 year ago
by
Adam Parák
💬
Browse files
Options
Downloads
Patches
Plain Diff
update README.md
parent
837f7a8e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+16
-6
16 additions, 6 deletions
README.md
with
16 additions
and
6 deletions
README.md
+
16
−
6
View file @
5cc9f0b6
...
@@ -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 afterward
s
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)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment