Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer documentation updates #908

Merged
merged 12 commits into from
Sep 18, 2024
6 changes: 3 additions & 3 deletions client/config/dev.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (typeof window !== 'undefined') {
window.env = {
REACT_APP_ENVIRONMENT: 'dev',
REACT_APP_URL: 'https://foo.com/',
REACT_APP_URL: 'http://localhost/',
REACT_APP_URL_BASENAME: '',
REACT_APP_URL_DTLINK: '/lab',
REACT_APP_URL_LIBLINK: '',
Expand All @@ -12,8 +12,8 @@ if (typeof window !== 'undefined') {

REACT_APP_CLIENT_ID: '1be55736756190b3ace4c2c4fb19bde386d1dcc748d20b47ea8cfb5935b8446c',
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_REDIRECT_URI: 'http://localhost/Library',
REACT_APP_LOGOUT_REDIRECT_URI: 'http://localhost/',
REACT_APP_GITLAB_SCOPES: 'openid profile read_user read_repository api',
};
};
25 changes: 25 additions & 0 deletions deploy/docker/DOCKER-ENV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Docker Compose

It contains the following environment variables.

Edit all the fields according to your specific case.

| URL Path | Example Value | Explanation |
|:------------|:---------------|:---------------|
| DTAAS_DIR | '/Users/username/DTaaS' | Full path to the DTaaS directory. This is an absolute path with no trailing slash. |
| SERVER_DNS | <http>_foo.com_</http> | The server DNS, if you are deploying with a dedicated server. Remember not use <http:>http(s)</http:> at the beginning of the DNS string |
| OAUTH_URL | <http>_gitlab.foo.com_<http/> | The URL of your Gitlab instance. It can be <http>_gitlab.com_<http/> if you are planning to use it for authorization. |
| CLIENT_ID | 'xx' | The ID of your server OAuth application |
| CLIENT_SECRET | 'xx' | The Secret of your server OAuth application |
| OAUTH_SECRET | 'random-secret-string' | Any private random string. This is a password you choose for local installation. |
| username1 | 'user1' | The gitlab instance username of a user of DTaaS |
| username2 | 'user2' | The gitlab instance username of a user of DTaaS |
| CLIENT_CONFIG | '/Users/username/DTaaS/deploy/config/client/env.js' | Full path to env.js file for client |

:clipboard: Important points to note:

1. The path examples given here are for Linux OS.
These paths can be Windows OS compatible paths as well.
1. The Server DNS can also be an IP address.
However, for proper working it is neccessary to use the
same convention (IP/DNS) in the `CLIENT_CONFIG` file as well.
32 changes: 5 additions & 27 deletions deploy/docker/SERVER.md
hkirk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -90,34 +90,12 @@ Three following configuration files need to be updated.

### Docker Compose

The docker compose configuration is in `deploy/docker/.env.server`.
it is a sample file.
It contains environment variables
that are used by the docker compose files.
The docker compose configuration is in `deploy/docker/.env.server`,
this is a sample file.
It contains environment variables that are used by the docker compose files.
It can be updated to suit your local installation scenario.
It contains the following environment variables.

Edit all the fields according to your specific case.

| URL Path | Example Value | Explanation |
|:------------|:---------------|:---------------|
| DTAAS_DIR | '/Users/username/DTaaS' | Full path to the DTaaS directory. This is an absolute path with no trailing slash. |
| SERVER_DNS | <http>_foo.com_</http> | The server DNS, if you are deploying with a dedicated server. Remember not use <http:>http(s)</http:> at the beginning of the DNS string |
| OAUTH_URL | <http>_gitlab.foo.com_<http/> | The URL of your Gitlab instance. It can be <http>_gitlab.com_<http/> if you are planning to use it for authorization. |
| CLIENT_ID | 'xx' | The ID of your server OAuth application |
| CLIENT_SECRET | 'xx' | The Secret of your server OAuth application |
| OAUTH_SECRET | 'random-secret-string' | Any private random string. This is a password you choose for local installation. |
| username1 | 'user1' | The gitlab instance username of a user of DTaaS |
| username2 | 'user2' | The gitlab instance username of a user of DTaaS |
| CLIENT_CONFIG | '/Users/username/DTaaS/deploy/config/client/env.js' | Full path to env.js file for client |

:clipboard: Important points to note:

1. The path examples given here are for Linux OS.
These paths can be Windows OS compatible paths as well.
1. The Server DNS can also be an IP address.
However, for proper working it is neccessary to use the
same convention (IP/DNS) in the `CLIENT_CONFIG` file as well.

Description of file configuration can be found here. [.env file description](./DOCKER-ENV.md)

### Website Client

Expand Down
6 changes: 4 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@ documentation for further help with creating these two OAuth applications.
The configuration files to be updated are:

1. docker/.env
please see [docker README](../deploy/docker/SERVER.md) for help
please see [docker README](../deploy/docker/DOCKER-ENV.md) for help
with updating this config file)
1. docker/conf.dev
please see [server docs](../docs/admin/servers/auth.md) for help
with updating this config file)
1. client/config/local.js
1. client/config/dev.js
please see [client config](../docs/admin/client/config.md) for help
with updating this config file)

*note*: username(s) in `.env`, must be equal traefic used in `conf.dev` for `onlyu*`.

## Development Environment

The development environment requires docker images to be built
Expand Down
2 changes: 2 additions & 0 deletions docs/admin/servers/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ you need two URLs: a _callback URL_ and a _logout URL_.

**4. Create OAuth Application:**

Oauth application setup on GitLab can be located on Edit Profile -> Application <https://gitlab.foo.com/-/profile/applications>.

During the creation of the OAuth application on GitLab, you need to specify
the scope. Choose **_read_user_** scope.

Expand Down
Loading