System Overview
CLARITY v4.2
Docker-based architecture
The deployment process for Chemotargets CLARITY has undergone a significant shift. Beginning with version 4.2, the system has transitioned to a docker-based deployment model. This change represents a modernization of the deployment infrastructure, leveraging the benefits of containerization technology.
Docker containers provide a lightweight and portable environment for running applications, ensuring consistency across different environments and simplifying the deployment process. By adopting a docker-based approach, Chemotargets CLARITY aims to enhance the scalability, maintainability, and portability of the system, ultimately improving the user experience and streamlining the deployment workflow.
Description
This system architecture uses Docker containers to run different parts of the application, making it modular and scalable. Here's a breakdown of the main components:
-
Database (db): This service runs the database using the
clrt4-db:latestimage. Its data is stored persistently in a volume namedpg-data. It communicates on the internalback-netnetwork and exposes port 5432 for internal connections. The database password is set topostgres. -
Backend (backend): This service handles the application's core logic, running the
clrt4-backend:latestimage. It depends on thedbservice, meaning the database must be running before the backend starts. It connects to both thefront-netandback-netnetworks and exposes port 9000 internally. It uses several persistent volumes for data (io-data), cache (io-cache), and license management (ct-license). It's configured to connect to the database service (db) on port 5432 using the passwordpostgres. Specific application settings are also configured via environment variables. -
Frontend (frontend): This is the user-facing part of the application, running the
clrt4-frontend:latestimage. It depends on thebackendservice. It connects to thefront-netnetwork and makes the application accessible externally by mapping port80on the host machine to port80inside the container. There are commented-out lines for potential SSL/TLS setup for secure connections. -
Helper service (helper): This is an auxiliary service using the
clrt4-helper:latestimage, is used for maintenance tasks like backing up or restoring data. It has access to the persistent volumes used by the database (pg-data), backend (io-data), and for licenses (ct-license). It's part of the 'tools' profile, suggesting it is not run by default unless specifically requested.
Networking:
- The host machine port 80 is mapped to the port 80 of the
frontendcontainer for external HTTP access. The HTTPS access can be added optionally. - The architecture uses two main internal networks:
back-net: Used for communication between the backend and the database.front-net: Used for communication between the frontend and the backend.- This separation helps secure the database by not exposing it directly to the frontend.
Data Persistence:
- Several volumes (
pg-data,ct-license,io-data,io-cache) are used to ensure that data generated by the database and backend services persists even if the containers are restarted or recreated.
Chart
External Access (port:80)
|
+----------------v------------------------------------------------------------+
| Host Machine | |
| | |
| Containers: | |
| v |
| +-------------+ +------------------+ +-------------+ |
| | Frontend | ---//---> | Backend | ---//--> | DB | |
| | (80->80) | front-net | (:9000) | back-net | (:5432) | |
| +-------------+ +------------------+ +-------------+ |
| v v v v |
| | | | | |
| | | | | |
| Volumes: | | | | |
| | | | | |
| [io-data] <-----------------+ | | [pg-data] <----+ |
| | | | | |
| [io-cache] <----------------=------+ | | |
| | | | | |
| [ct-license] <--------------=------=------+ | |
| | | | | |
| | | | | |
| +-----------------+ | | | | |
| | Helper | | | | | |
| | (Tools Profile) | >--------+------+------+--------------------+ |
| +-----------------+ |
| (Accesses Volumes) |
| |
| |
+-----------------------------------------------------------------------------+
Key:
--//--> : Network connection (front-net or back-net)
[volume] <- : Volume connection to a service