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

25 changes: 25 additions & 0 deletions deploy/docker/ENV.md
hkirk marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

@prasadtalasila prasadtalasila Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hkirk This file is same as DOCKER-ENV.md. Please remove ENV.md file. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - sorry

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### Docker Compose
hkirk marked this conversation as resolved.
Show resolved Hide resolved
hkirk marked this conversation as resolved.
Show resolved Hide resolved

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.
31 changes: 4 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,11 @@ 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` it is a sample file.
hkirk marked this conversation as resolved.
Show resolved Hide resolved
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](./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/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/-/profile/applications>.
hkirk marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down