You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docker/README.md
+29-4
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,21 @@
2
2
3
3
To build the image you can execute `./build.sh`, or:
4
4
5
+
```bash
6
+
docker build -t autosubmit-gui
7
+
```
8
+
9
+
> **NOTE**: The default image builds a GUI which `AUTOSUBMIT_API_SOURCE` is the relative path `/api`. This is needed if you want to change it using environment variables when starting the container.
On the build, you can select a different tag/branch/commit by running:
19
+
Also, you can select a different tag/branch/commit by running:
12
20
13
21
```bash
14
22
docker build \
@@ -17,7 +25,9 @@ docker build \
17
25
-t autosubmit-gui
18
26
```
19
27
20
-
Other `--build-arg` are available that are related to the build environment variables with prefix `REACT_APP_`. See the `Dockerfile` to know more about it. **Note: This environment variables are only used while building, modifying them on runtime will not make any change.**
28
+
Other `--build-arg` are available that are related to the build environment variables with prefix `REACT_APP_`. See the `Dockerfile` to know more about it.
29
+
30
+
> **IMPORTANT: This environment variables that are set using the build arguments are only used while building, modifying them on runtime will not make any change.**
21
31
22
32
## Run
23
33
@@ -29,4 +39,19 @@ docker run --name autosubmit-gui-container \
29
39
autosubmit-gui
30
40
```
31
41
32
-
**Remember to map the port `8080` to the one you desire. In the example above, it is mapped to port `8089`.**
42
+
**Remember to map the port `8080` to the one you desire. In the example above, it is mapped to port `8089`.**
43
+
44
+
If the `AUTOSUBMIT_API_SOURCE` was not set during the build, the GUI will use the relative path `/api`. This means, if the GUI is served in `localhost:8080`, it will send the API requests to `localhost:8080/api`.
45
+
46
+
This mechanism works because the container can proxy the requests sent to `localhost:8080/api` to another URL using Nginx. And this can be set doing:
This will forward the requests send to `localhost:8080/api` to `https://hostname/external-as-api/`. For example, `GET localhost:8080/api/v4/experiments` will go to `GET https://hostname/external-as-api/v4/experiments`.
56
+
57
+
With this option there is no need to build the image again.
0 commit comments