Skip to content

Commit ca68878

Browse files
Merge pull request #75 from i-on-project/staging
Small fixes
2 parents 2bbd291 + 5724315 commit ca68878

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

.docker/docker-compose-heroku.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
context: ../project
99
dockerfile: ./web-dockerfile
1010
args:
11-
OPERATION_MODE: "${OPERATION_MODE-core-data}"
11+
OPERATION_MODE: "${OPERATION_MODE-integrated}"
1212
CORE_URL: "${CORE_URL-http://172.17.0.1:10023}"
1313
CORE_READ_TOKEN: "${CORE_READ_TOKEN-l7kowOOkliu21oXxNpuCyM47u2omkysxb8lv3qEhm5U}"
1414
CORE_CLIENT_ID: "${CORE_CLIENT_ID-22dd1551-db23-481b-acde-d286440388a5}"

.docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
context: ../project
99
dockerfile: ./web-dockerfile
1010
args:
11-
OPERATION_MODE: "${OPERATION_MODE-core-data}"
11+
OPERATION_MODE: "${OPERATION_MODE-integrated}"
1212
CORE_URL: "${CORE_URL-http://172.17.0.1:10023}"
1313
CORE_READ_TOKEN: "${CORE_READ_TOKEN-l7kowOOkliu21oXxNpuCyM47u2omkysxb8lv3qEhm5U}"
1414
CORE_CLIENT_ID: "${CORE_CLIENT_ID-22dd1551-db23-481b-acde-d286440388a5}"

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ i-on Web has the following functionalities available:
4545
- Make it possible to view the list of selected courses;
4646
- Notify the student, on the home page, of upcoming events (tests, exams, among others) of the courses he / she attends;
4747
- Construction of the student's calendar with the events of the courses to which he is enrolled;
48-
- Make it possible to download the student's schedule.
48+
- Make it possible to download (pdf file) the student's schedule;
49+
- Allow the user to change his/hers username.
4950

5051
i-on Web is continuously being developt, as such, more funcionalities will be / are being added, namely:
5152

52-
- User settings that allow the user to change the programme, username, among other information;
5353
- Switch the language (between Portuguese and English) of the web interface.
5454

5555
# Getting started
5656
Next we will see how we can run the i-on Web application according to its operation modes and using docker compose.
5757

5858
## Docker-compose
5959
The docker compose file contains the following enviroment variables:
60-
- __`OPERATION_MODE`__ - Where we can specify the operation mode. As seen previously, the operation mode by default, is using the i-on Core data;
60+
- __`OPERATION_MODE`__ - Where we can specify the operation mode. By default, its integrated mode which connects to i-on Core;
6161

6262
- __`CORE_URL`__ - Where we can indicate the location of i-on Core. By default is set to `http://172.17.0.1:10023` since i-on Core listens on port `10023` and since both applications are running locally but in isolated containers, in order to make requests from i-on Web to i-on Core we can use the IP `172.17.0.1`;
6363

@@ -82,18 +82,17 @@ When building the docker image we can specify the development operation mode by
8282
docker-compose -f .docker/docker-compose.yml build --build-arg OPERATION_MODE="standalone"
8383
```
8484

85-
In similarity to the command previously shown, where we assigned a value to the variable `OPERATION_MODE`, the same can be done with the remaining variables. Assigning the multiple variables can be done, like the following example:
86-
```
87-
docker-compose -f .docker/docker-compose.yml build --build-arg OPERATION_MODE="standalone" --build-arg CORE_CLIENT_ID="22dd1551-db23-481b-acde-d286440388a5"
88-
```
89-
9085
### Integrated mode
9186
This mode allows us to run the i-on Web application using the data provided by i-on Core, as such, both i-on Web and i-on Core need to be running locally. In order to download and run i-on Core please head to the [i-on Core GitHub repository](https://github.com/i-on-project/core).
9287

9388
The environment variables present in the docker compose file should be enough for us to establish a connection to i-on Core, as such, we only need to execute the following command on the __root directory__:
9489
```
9590
docker-compose -f .docker/docker-compose.yml build
9691
```
92+
In similarity to the command previously shown, we can assign values to the enviroment variables, as shown in the following example:
93+
```
94+
docker-compose -f .docker/docker-compose.yml build --build-arg PATH_PREFIX="/i-on-web" --build-arg CORE_READ_TOKEN="l7kowOOkliu21oXxNpuCyM47u2omkysxb8lv3qEhm5U"
95+
```
9796

9897
## Running i-on Web
9998
After executing the build command, in order to run i-on Web locally we can execute the following command on the __root directory__:

docs/i-on Web Relatorio Final.pdf

1.92 MB
Binary file not shown.
363 KB
Binary file not shown.
250 KB
Binary file not shown.

project/i-on-web-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ async function configurations() {
8181

8282
};
8383

84-
const timeToRetry = 60000;
85-
const retryInterval = 5000;
84+
const timeToRetry = 5 * 60000; // 5 min
85+
const retryInterval = 4 * 5000; // 20s
8686
let timePassed = 0;
8787
const myInterval = setInterval(async () => {
8888
if(timePassed < timeToRetry) {

0 commit comments

Comments
 (0)