From 77e76005582217f866e2c64b2a59ca5e0dc88fab Mon Sep 17 00:00:00 2001 From: Gemma Milla Date: Fri, 22 Dec 2023 10:02:24 +0100 Subject: [PATCH 1/3] Create README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c2c0d31 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +Instructions on how to deploy the Beacon Network User Interface + + +Please first create a .env file inside the frontend folder so that you can modify some variables as follows: + +REACT_APP_CLIENT_ID="ID of your LS Login" +REACT_APP_CLIENT_SECRET="password of your LS Login" + + +After that please proceed to execute the command docker-compose up -d –build in order to deploy the UI. + +Then please edit the file config.json, which can be found inside folder frontend/src. You need to decide where you want the UI to point to when making requests. Find below an example: + +{ + "API_URL": "https://yourAPIdomain.com/beacon-network/v2.0.0", + "REDIRECT_URL": "https://yourUIdomain.com", + "KEYCLOAK_URL": "https://yourKEYCLOAKdomain.com" + } + + +Please take into account that the above file will not be copied to Github as it contains keys and for security reasons it should ignored. +In the root folder (frontend) you will find a file called .gitignore with the list of all files that need to be ignored. From 0fa5cd0889a9db112d39974d9943f66b3559d0d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20L=C3=B3pez-Doriga?= Date: Fri, 22 Dec 2023 15:54:26 +0100 Subject: [PATCH 2/3] editing compose and readme --- README.md | 19 +++++++++++++------ docker-compose.yml | 5 ++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c2c0d31..962a721 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,29 @@ -Instructions on how to deploy the Beacon Network User Interface +## Instructions on how to deploy the Beacon Network User Interface Please first create a .env file inside the frontend folder so that you can modify some variables as follows: +```bash REACT_APP_CLIENT_ID="ID of your LS Login" REACT_APP_CLIENT_SECRET="password of your LS Login" +``` +Take into account that the above file will not be copied to GitHub as it contains keys and for security reasons it should ignored. -After that please proceed to execute the command docker-compose up -d –build in order to deploy the UI. - -Then please edit the file config.json, which can be found inside folder frontend/src. You need to decide where you want the UI to point to when making requests. Find below an example: +After that please proceed to execute the next command in order to deploy the UI. + ```bash +docker-compose up -d –build +``` + +Then please edit the file config.json, which can be found inside folder [frontend/src](https://github.com/elixir-europe/beacon-network-ui/tree/main/frontend/src). You need to decide where you want the UI to point to when making requests. Find below an example: + + ```bash { "API_URL": "https://yourAPIdomain.com/beacon-network/v2.0.0", "REDIRECT_URL": "https://yourUIdomain.com", "KEYCLOAK_URL": "https://yourKEYCLOAKdomain.com" } +``` - -Please take into account that the above file will not be copied to Github as it contains keys and for security reasons it should ignored. In the root folder (frontend) you will find a file called .gitignore with the list of all files that need to be ignored. diff --git a/docker-compose.yml b/docker-compose.yml index 361e73f..1bbd501 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,4 +11,7 @@ services: - CHOKIDAR_USEPOLLING=true ports: - 3000:3000 - stdin_open: true \ No newline at end of file + stdin_open: true + volumes: + - ./frontend/.env:/frontend/.env + - ./frontend/src/config.json:/frontend/src/config.json \ No newline at end of file From 80796654ab4d2277afd525e33a76a1d8fc847105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20L=C3=B3pez-Doriga?= Date: Fri, 22 Dec 2023 15:55:59 +0100 Subject: [PATCH 3/3] editing gitignore --- frontend/.gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/.gitignore b/frontend/.gitignore index 532eddc..8027778 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -22,4 +22,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -.env \ No newline at end of file +.env + +*config.json \ No newline at end of file