Docker Workflow for DTaaS
This document describes the building and use of different Docker files for development and installation of the DTaaS platform.
NOTE: A local Docker CE installation is a prerequisite for using Docker workflows.
Folder Structure
There are four dockerfiles for building the containers:
- client.dockerfile: Dockerfile for building the client application container.
- client.built.dockerfile: Dockerfile for copying
an already built client application into docker image.
This dockerfile copies
client/builddirectory and serves it from inside the docker container. - libms.dockerfile: Dockerfile for building the library microservice container from source code.
- libms.npm.dockerfile: Dockerfile for building the library microservice container from published npm package at npmjs.com. This Dockerfile is only used during publishing. It is used neither in the development builds nor in Github actions.
In addition, there are docker compose and configuration files.
- compose.dev.yml: Docker Compose configuration for development environment.
- .env: environment variables for docker compose file
- conf.dev OAuth 2.0 configuration required by the Traefik forward-auth service
Build and Publish Docker Images
The github workflows publish docker images of client website and libms to github and docker hub.
Developer Usage
Docker images are useful for development purposes. Developers are advised to build the required images locally on their computers for use during development. The images can be built using
Running Docker Containers
The following steps describe how to use the application with Docker.
The DTaaS platform requires multiple configuration files. The list of configuration files to be modified is provided for each scenario.
Development Environment
This scenario is intended for software developers.
The following configuration files require updating:
- docker/.env : Refer to the Docker installation documentation for guidance on updating this configuration file.
- docker/conf.dev : Refer to the Docker installation documentation for guidance on updating this configuration file.
- client/config/local.js : Refer to the client configuration documentation for guidance on updating this configuration file.
- servers/lib/config/libms.dev.yaml : Refer to the library microservice configuration documentation for guidance on updating this configuration file.
The docker commands need to be executed from this directory (docker).
The relevant docker commands are:
Accessing the Application
The application should be accessed through the port mapped to the Traefik
container, e.g., localhost.