From 4a0ff282f0c8abc016b7cc2471ba3b71cee7d7f3 Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Fri, 13 Sep 2024 09:32:38 +0200 Subject: [PATCH 01/10] Consolidation of development configuration. --- deploy/docker/COMPOSE.md | 25 +++++++++++++++++++++++++ deploy/docker/SERVER.md | 31 ++++--------------------------- docker/README.md | 6 ++++-- 3 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 deploy/docker/COMPOSE.md diff --git a/deploy/docker/COMPOSE.md b/deploy/docker/COMPOSE.md new file mode 100644 index 000000000..08c4663a6 --- /dev/null +++ b/deploy/docker/COMPOSE.md @@ -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 | _foo.com_ | The server DNS, if you are deploying with a dedicated server. Remember not use http(s) at the beginning of the DNS string | + | OAUTH_URL | _gitlab.foo.com_ | The URL of your Gitlab instance. It can be _gitlab.com_ 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. \ No newline at end of file diff --git a/deploy/docker/SERVER.md b/deploy/docker/SERVER.md index 7696ca705..9e76e9f70 100644 --- a/deploy/docker/SERVER.md +++ b/deploy/docker/SERVER.md @@ -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. +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 | _foo.com_ | The server DNS, if you are deploying with a dedicated server. Remember not use http(s) at the beginning of the DNS string | - | OAUTH_URL | _gitlab.foo.com_ | The URL of your Gitlab instance. It can be _gitlab.com_ 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](./COMPOSE.md) ### Website Client diff --git a/docker/README.md b/docker/README.md index f4ad9569a..c3c82328b 100644 --- a/docker/README.md +++ b/docker/README.md @@ -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/COMPOSE.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 From 048c181c36fc3d244cc1ab781709f333958e456f Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Fri, 13 Sep 2024 09:40:58 +0200 Subject: [PATCH 02/10] Oauth server creation on GitLab --- docs/admin/servers/auth.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/admin/servers/auth.md b/docs/admin/servers/auth.md index 2b3d215eb..a235d609d 100644 --- a/docs/admin/servers/auth.md +++ b/docs/admin/servers/auth.md @@ -53,6 +53,7 @@ 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 During the creation of the OAuth application on GitLab, you need to specify the scope. Choose **_read_user_** scope. From 909b489ad503e0235653c8cfc0cf06b78c2b5473 Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Fri, 13 Sep 2024 09:41:26 +0200 Subject: [PATCH 03/10] Typo --- docs/admin/servers/auth.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/admin/servers/auth.md b/docs/admin/servers/auth.md index a235d609d..d501ea821 100644 --- a/docs/admin/servers/auth.md +++ b/docs/admin/servers/auth.md @@ -53,7 +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 +Oauth application setup on GitLab can be located on Edit Profile -> Application . + During the creation of the OAuth application on GitLab, you need to specify the scope. Choose **_read_user_** scope. From 002e281b68f600fdd4b0c530cc19da18d414162b Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Fri, 13 Sep 2024 09:43:43 +0200 Subject: [PATCH 04/10] Renamed .env file description md file --- deploy/docker/{COMPOSE.md => ENV.md} | 0 deploy/docker/SERVER.md | 2 +- docker/README.md | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename deploy/docker/{COMPOSE.md => ENV.md} (100%) diff --git a/deploy/docker/COMPOSE.md b/deploy/docker/ENV.md similarity index 100% rename from deploy/docker/COMPOSE.md rename to deploy/docker/ENV.md diff --git a/deploy/docker/SERVER.md b/deploy/docker/SERVER.md index 9e76e9f70..665497d48 100644 --- a/deploy/docker/SERVER.md +++ b/deploy/docker/SERVER.md @@ -94,7 +94,7 @@ The docker compose configuration is in `deploy/docker/.env.server` it is a sampl It contains environment variables that are used by the docker compose files. It can be updated to suit your local installation scenario. -Description of file configuration can be found here. [.env file description](./COMPOSE.md) +Description of file configuration can be found here. [.env file description](./ENV.md) ### Website Client diff --git a/docker/README.md b/docker/README.md index c3c82328b..7d3ca91fb 100644 --- a/docker/README.md +++ b/docker/README.md @@ -61,7 +61,7 @@ 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/COMPOSE.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 From fe086e3cda8298c663603ed24da0fa967e0a5ac1 Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Fri, 13 Sep 2024 10:27:09 +0200 Subject: [PATCH 05/10] Default URLs in dev client dev env --- client/config/dev.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/config/dev.js b/client/config/dev.js index 306125768..e8b36f844 100644 --- a/client/config/dev.js +++ b/client/config/dev.js @@ -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: '', @@ -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', }; }; From 68bc50cad891cb4cb2df265ccb6d2da90eebae95 Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Fri, 13 Sep 2024 10:52:09 +0200 Subject: [PATCH 06/10] Changed headline to header Due to error in codecliemate --- deploy/docker/ENV.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/ENV.md b/deploy/docker/ENV.md index 08c4663a6..f78691401 100644 --- a/deploy/docker/ENV.md +++ b/deploy/docker/ENV.md @@ -1,4 +1,4 @@ -### Docker Compose +# Docker Compose It contains the following environment variables. From c4addbd78d62b1778c0baed54d6c30f3b3b916ae Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Tue, 17 Sep 2024 08:49:04 +0200 Subject: [PATCH 07/10] Updated docs for linting and better naming --- deploy/docker/DOCKER-ENV.md | 25 +++++++++++++++++++++++++ deploy/docker/SERVER.md | 5 +++-- docker/README.md | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 deploy/docker/DOCKER-ENV.md diff --git a/deploy/docker/DOCKER-ENV.md b/deploy/docker/DOCKER-ENV.md new file mode 100644 index 000000000..08c4663a6 --- /dev/null +++ b/deploy/docker/DOCKER-ENV.md @@ -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 | _foo.com_ | The server DNS, if you are deploying with a dedicated server. Remember not use http(s) at the beginning of the DNS string | + | OAUTH_URL | _gitlab.foo.com_ | The URL of your Gitlab instance. It can be _gitlab.com_ 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. \ No newline at end of file diff --git a/deploy/docker/SERVER.md b/deploy/docker/SERVER.md index 665497d48..df70a649a 100644 --- a/deploy/docker/SERVER.md +++ b/deploy/docker/SERVER.md @@ -90,11 +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. +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. -Description of file configuration can be found here. [.env file description](./ENV.md) +Description of file configuration can be found here. [.env file description](./DOCKER-ENV.md) ### Website Client diff --git a/docker/README.md b/docker/README.md index 7d3ca91fb..2dca93849 100644 --- a/docker/README.md +++ b/docker/README.md @@ -61,7 +61,7 @@ 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/ENV.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 From 107784d93b3a219eeed0852338cfe119534ce4c5 Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Wed, 18 Sep 2024 11:40:10 +0200 Subject: [PATCH 08/10] Missing url --- docs/admin/servers/auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/servers/auth.md b/docs/admin/servers/auth.md index d501ea821..f5869f2d6 100644 --- a/docs/admin/servers/auth.md +++ b/docs/admin/servers/auth.md @@ -53,7 +53,7 @@ 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 . +Oauth application setup on GitLab can be located on Edit Profile -> Application . During the creation of the OAuth application on GitLab, you need to specify the scope. Choose **_read_user_** scope. From d49ddb0190f119585464ccbde2dfd1c302f7a637 Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Wed, 18 Sep 2024 11:42:06 +0200 Subject: [PATCH 09/10] Headline fix --- deploy/docker/DOCKER-ENV.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/DOCKER-ENV.md b/deploy/docker/DOCKER-ENV.md index 08c4663a6..f78691401 100644 --- a/deploy/docker/DOCKER-ENV.md +++ b/deploy/docker/DOCKER-ENV.md @@ -1,4 +1,4 @@ -### Docker Compose +# Docker Compose It contains the following environment variables. From 4ad48b2a48f7b5cebcc79a858f4b23169828997e Mon Sep 17 00:00:00 2001 From: Henrik Kirk Date: Wed, 18 Sep 2024 14:13:53 +0200 Subject: [PATCH 10/10] Removed duplicate file --- deploy/docker/ENV.md | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 deploy/docker/ENV.md diff --git a/deploy/docker/ENV.md b/deploy/docker/ENV.md deleted file mode 100644 index f78691401..000000000 --- a/deploy/docker/ENV.md +++ /dev/null @@ -1,25 +0,0 @@ -# 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 | _foo.com_ | The server DNS, if you are deploying with a dedicated server. Remember not use http(s) at the beginning of the DNS string | - | OAUTH_URL | _gitlab.foo.com_ | The URL of your Gitlab instance. It can be _gitlab.com_ 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. \ No newline at end of file