forked from INTO-CPS-Association/DTaaS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructures and adds new content to docs
- Loading branch information
1 parent
fa39b56
commit c41e4bb
Showing
13 changed files
with
364 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Configure Client Website | ||
|
||
<!-- markdownlint-disable MD046 --> | ||
<!-- prettier-ignore --> | ||
!!! failure | ||
Consolidate all config description here, even the instructions | ||
from README of client/ directory. | ||
<!-- markdownlint-enable MD046 --> | ||
|
||
This page describes various configuration options for react website. | ||
|
||
```js | ||
if (typeof window !== 'undefined') { | ||
window.env = { | ||
REACT_APP_ENVIRONMENT: "prod | dev", | ||
REACT_APP_URL: "URL for the gateway", | ||
REACT_APP_URL_BASENAME: "Base URL for the client website"(optional), | ||
REACT_APP_URL_DTLINK: "Endpoint for the Digital Twin", | ||
REACT_APP_URL_LIBLINK: "Endpoint for the Library Assets", | ||
REACT_APP_WORKBENCHLINK_VNCDESKTOP: "Endpoint for the VNC Desktop link", | ||
REACT_APP_WORKBENCHLINK_VSCODE: "Endpoint for the VS Code link", | ||
REACT_APP_WORKBENCHLINK_JUPYTERLAB: "Endpoint for the Jupyter Lab link", | ||
REACT_APP_WORKBENCHLINK_JUPYTERNOTEBOOK: | ||
"Endpoint for the Jupyter Notebook link", | ||
REACT_APP_CLIENT_ID: 'AppID genereated by the gitlab OAuth provider', | ||
REACT_APP_AUTH_AUTHORITY: 'URL of the private gitlab instance', | ||
REACT_APP_REDIRECT_URI: 'URL of the homepage for the logged in users of the website', | ||
REACT_APP_LOGOUT_REDIRECT_URI: 'URL of the homepage for the anonymous users of the website', | ||
REACT_APP_GITLAB_SCOPES: 'OAuth scopes. These should match with the scopes set in gitlab OAuth provider', | ||
}; | ||
}; | ||
|
||
// Example values with no base URL. Trailing and ending slashes are optional. | ||
if (typeof window !== 'undefined') { | ||
window.env = { | ||
REACT_APP_ENVIRONMENT: 'prod', | ||
REACT_APP_URL: 'https://foo.com/', | ||
REACT_APP_URL_BASENAME: '', | ||
REACT_APP_URL_DTLINK: '/lab', | ||
REACT_APP_URL_LIBLINK: '', | ||
REACT_APP_WORKBENCHLINK_VNCDESKTOP: '/tools/vnc/?password=vncpassword', | ||
REACT_APP_WORKBENCHLINK_VSCODE: '/tools/vscode/', | ||
REACT_APP_WORKBENCHLINK_JUPYTERLAB: '/lab', | ||
REACT_APP_WORKBENCHLINK_JUPYTERNOTEBOOK: '', | ||
REACT_APP_CLIENT_ID: '934b98f03f1b6f743832b2840bf7cccaed93c3bfe579093dd0942a433691ccc0', | ||
REACT_APP_AUTH_AUTHORITY: 'https://gitlab.foo.com/', | ||
REACT_APP_REDIRECT_URI: 'https://foo.com/Library', | ||
REACT_APP_LOGOUT_REDIRECT_URI: 'https://foo.com/', | ||
REACT_APP_GITLAB_SCOPES: 'openid profile read_user read_repository api', | ||
}; | ||
}; | ||
|
||
|
||
// Example values with "bar" as basename URL. | ||
//Trailing and ending slashes are optional. | ||
if (typeof window !== 'undefined') { | ||
window.env = { | ||
REACT_APP_ENVIRONMENT: "dev", | ||
REACT_APP_URL: 'https://foo.com/', | ||
REACT_APP_URL_BASENAME: 'bar', | ||
REACT_APP_URL_DTLINK: '/lab', | ||
REACT_APP_URL_LIBLINK: '', | ||
REACT_APP_WORKBENCHLINK_VNCDESKTOP: '/tools/vnc/?password=vncpassword', | ||
REACT_APP_WORKBENCHLINK_VSCODE: '/tools/vscode/', | ||
REACT_APP_WORKBENCHLINK_JUPYTERLAB: '/lab', | ||
REACT_APP_WORKBENCHLINK_JUPYTERNOTEBOOK: '', | ||
REACT_APP_CLIENT_ID: '934b98f03f1b6f743832b2840bf7cccaed93c3bfe579093dd0942a433691ccc0', | ||
REACT_APP_AUTH_AUTHORITY: 'https://gitlab.foo.com/', | ||
REACT_APP_REDIRECT_URI: 'https://foo.com/bar/Library', | ||
REACT_APP_LOGOUT_REDIRECT_URI: 'https://foo.com/bar', | ||
REACT_APP_GITLAB_SCOPES: 'openid profile read_user read_repository api', | ||
}; | ||
}; | ||
``` | ||
|
||
## Multiple DTaaS applications | ||
|
||
<!-- markdownlint-disable MD046 --> | ||
<!-- prettier-ignore --> | ||
!!! warning | ||
This is not a regular installation scenario and is only | ||
recommended for experts. | ||
This installation setup requires significant modifications | ||
to the docker compose files. | ||
<!-- markdownlint-enable MD046 --> | ||
|
||
The DTaaS is a regular web application. It is possible to host multiple DTaaS | ||
applications on the same server. The only requirement is to have a distinct URLs. | ||
You can have three DTaaS applications running at the following URLs. | ||
|
||
```txt | ||
https://foo.com/au | ||
https://foo.com/acme | ||
https://foo.com/bar | ||
``` | ||
|
||
All of these instances can use the same gitlab instance for authorization. | ||
|
||
| DTaaS application URL | Gitlab Instance URL | Callback URL | Logout URL | Application ID | | ||
|:----|:----|:----|:----|:----| | ||
| <https://foo.com/au> | <https://foo.gitlab.com> | <https://foo.com/au/Library> | <https://foo.com/au> | autogenerated by gitlab | | ||
| <https://foo.com/acme> | <https://foo.gitlab.com> | <https://foo.com/au/Library> | <https://foo.com/au> | autogenerated by gitlab | | ||
| <https://foo.com/bar> | <https://foo.gitlab.com> | <https://foo.com/au/Library> | <https://foo.com/au> | autogenerated by gitlab | | ||
|| | ||
|
||
If you are hosting multiple DTaaS instances on the same server, | ||
do not install DTaaS with a null basename on the same server. | ||
Even though it works well, the setup is confusing to setup | ||
and may lead to maintenance issues. | ||
|
||
If you choose to host your DTaaS application with a basename (say bar), then the | ||
URLs in `env.js` change to: | ||
|
||
```txt | ||
DTaaS application URL: https://foo.com/bar | ||
Gitlab instance URL: https://foo.gitlab.com | ||
Callback URL: https://foo.com/bar/Library | ||
Logout URL: https://foo.com/bar | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.