Skip to content

Commit

Permalink
Removes redundant docs and adds User docs
Browse files Browse the repository at this point in the history
  • Loading branch information
astitva1905 committed May 22, 2024
1 parent eac77ea commit bdcaf45
Show file tree
Hide file tree
Showing 14 changed files with 304 additions and 190 deletions.
51 changes: 0 additions & 51 deletions docs/admin/docker/README.md

This file was deleted.

77 changes: 0 additions & 77 deletions docs/admin/docker/client.md

This file was deleted.

Binary file removed docs/admin/docker/gitlab-app-1.png
Binary file not shown.
40 changes: 0 additions & 40 deletions docs/admin/docker/gitlab.md

This file was deleted.

Binary file removed docs/admin/docker/image.png
Binary file not shown.
25 changes: 21 additions & 4 deletions docs/admin/host.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,27 @@ In the new application configuration, there are two OAuth2 applications.

The installation requirements to run this docker version of the DTaaS are:

- DNS name for the server
- docker with compose plugin
- User accounts on a gitlab instance
- OAuth2 application registrations
### Docker with Compose Plugin

[Docker](https://www.docker.com/)** - It is important to have docker installed on your system/ server. We highly recommend using [Docker Desktop](https://www.docker.com/products/docker-desktop/).

### Domain name

The DTaaS software is a web application and is preferably hosted
on a server with a domain name like <http:>_foo.com_</http:>.
However, it is possible to install the software on your computer
and use access it at <http:>_localhost_</http:>.

### Reverse Proxy

The installation setup recommends that the _foo.com_ server is behind a reverse
proxy / load balancer that provides https termination. You can still use
the DTaaS software even if you do not have this reverse proxy.

### OAuth Provider

**[Gitlab Instance](https://about.gitlab.com/install/)** - DTaaS Authorization uses Gitlab OAuth2.0 authentication. Thus, to enable user authentication and authorization for your DTaaS instance, you will need a Gitlab Instance. You can bring up a private instance (recommended), or you can use [gitlab.com](www.gitlab.com) itself.


### Create User Accounts

Expand Down
95 changes: 95 additions & 0 deletions docs/developer/docker/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Docker workflow for DTaaS

This readme will explain the building and use of different docker files
for use in development and installation of the DTaaS software.

**NOTE**: A local docker and docker-compose installation is a pre-requisite
for using docker workflows.

## Folder Structure

There are two dockerfiles for building the containers:

- **client.dockerfile**: Dockerfile for building
the client application container.
- **libms.dockerfile**: Dockerfile for building the library microservice container.

There is a specific compose file for development:

- **compose.dev.yml:** Docker Compose configuration for development environment.

## Build and Publish Docker Images

### Users

Build and publish the docker images. This step is required only for
the publication of images to Docker Hub. This publishing step is managed
only by project maintainers. Regular users can skip this step.

```sh
docker login -u <username> -p <password>
docker build -t intocps/libms:latest -f ./docker/libms.dockerfile .
docker tag intocps/libms:latest intocps/libms:version
docker push intocps/libms:latest
docker push intocps/libms:version

docker build -t intocps/dtaas-web:latest -f ./docker/client.dockerfile .
docker tag intocps/dtaas-web:latest intocps/dtaas-web:version
docker push intocps/dtaas-web:latest
docker push intocps/dtaas-web:version
```

To tag version 0.3.1 for example, use

```sh
docker tag intocps/dtaas-web:latest intocps/dtaas-web:0.3.1
```

### Developers

Use of docker images is handy for developers as well. It is suggested
that developers build the required images locally on their computer and
use them for development purposes. The images can be built using

```sh
docker-compose -f compose.dev.yml build
```

## Running Docker Containers

Follow these steps to use the application with docker.

The DTaaS application requires multiple configuration files. The list of
configuration files to be modified are given for each scenario.

### Development Environment

This scenario is for software developers.

The configuration files to be updated are:

1. docker/dev/.env
please see [docker README](../README.md) for help
with updating this config file)
1. docker/conf.local
please see [server docs](../docs/admin/servers/auth.md) for help
with updating this config file)
1. client/config/local.js
please see [client config](../../docs/admin/client/CLIENT.md) for help
with updating this config file)
1. servers/lib/config/.env.default
please see [lib config](../../docs/admin/servers/lib/LIB-MS.md) for help
with updating this config file)

The docker commands need to be executed from this directory (`docker/dev`).
The relevant docker commands are:

```bash
docker-compose -f compose.dev.yml up -d #start the application
docker-compose -f compose.dev.yml down #terminate the application
```

### Access the Application

You should access the application through the PORT mapped to the Traefik container.
e.g. `localhost`
Loading

0 comments on commit bdcaf45

Please sign in to comment.