Deployment Overview of Quant-UX on Server¶
Prerequisites and Basic Requirements¶
To ensure the successful deployment of Quant-UX, the following requirements must be met:
-
Operating System: Ubuntu (recommended).
-
Privileges: Root or sudo access is required for installation.
-
Ports:
-
443/tcp: External HTTPS traffic. -
8082/tcp: Internal application access. -
1025/tcp: SMTP testing (Mailpit).
FQDN of the final panel on the hostkey.in domain¶
The application is accessible via a dynamically generated subdomain based on the server ID.
| Parameter | Value |
|---|---|
| Prefix | quantux |
| Domain | hostkey.in |
| Full template | quantux{Server_ID}.hostkey.in |
File and Directory Structure¶
The application utilizes the following directory structure for configuration, data persistence, and proxy management:
-
/opt/quantux/: Main application deployment directory containing the Docker Compose configuration. -
/opt/ant-ux/data/: MongoDB database storage. -
/opt/quant-ux/quant-ux-data/: Application backend data (images and app files). -
/root/nginx/: Nginx reverse proxy configuration files. -
/data/nginx/user_conf.d/: SSL and Nginx site configurations.
Application Installation Process¶
The installation is performed using a combination of system package management and Docker Compose:
-
System Preparation: The server environment is prepared, and the
dockerengine is installed to manage containerized services. -
Directory Setup: A dedicated directory
/opt/quantuxis created with restricted permissions (0750). -
Configuration Generation: A Docker Compose file (
quantux-compose.yml) is generated in/opt/quantux. -
Image Retrieval: The required Docker images are pulled from their respective registries.
-
Service Orchestration: Docker Compose is used to launch the application stack, ensuring all dependencies (database, backend, frontend) start in the correct order.
-
Proxy Configuration: An Nginx container is deployed via a separate compose file located in
/root/nginxto handle SSL termination and reverse proxying.
Access Rights and Security¶
-
Permissions: Application directories are configured with strict ownership (root) and specific modes (
0750or0640) to prevent unauthorized access. -
Network Isolation: The application backend is bound to
127.0.0.1:8082to ensure it is not directly accessible from the public internet, forcing all traffic through the Nginx proxy. -
SSL/TLS: SSL certificates are managed via Certbot and served through an Nginx container using external secrets volumes.
Databases¶
The application uses MongoDB as its primary data store.
| Component | Connection String / Method | Storage Location |
|---|---|---|
| MongoDB | mongodb://quant-ux-mongo:27017 | /opt/ant-ux/data |
Docker Containers and Their Deployment¶
The deployment consists of several containers managed via Docker Compose.
Application Stack (quantux-compose.yml)¶
| Container Name | Image | Ports | Volumes | Environment Variables | Restart Policy |
|---|---|---|---|---|---|
quant-ux-smtp-sink | axllent/mailpit | N/A | N/A | N/A | always |
quant-ux-mongo | mongo | N/A | /opt/ant-ux/data:/data/db | N/A | always |
quantux{Server_ID}.hostkey.in | klausenschaefersinho/quant-ux | 127.0.0.1:8082:8082 | N/A | QUX_PROXY_URL, QUX_AUTH, etc. | always |
quant-ux-backend | bmcgonag/qux-be | N/A | /opt/quant-ux/quant-ux-data:/app-data | QUX_MONGO_CONNECTION_STRING, TZ=Europe/Moscow, etc. | always |
quant-ux-websocket-server | klausenschaefersinho/quant-ux-websocket | N/A | N/A | QUX_SERVER, QUX_SERVER_PORT | always |
Proxy Stack (compose.yml)¶
| Container Name | Image | Ports | Volumes | Environment Variables | Restart Policy |
|---|---|---|---|---|---|
nginx | jonasal/nginx-certbot:latest | Host Network | nginx_secrets:/etc/letsencrypt, /data/nginx/user_conf.d:/etc/nginx/user_conf.d | [email protected] | unless-stopped |
Application Update Instructions¶
To update the Quant-UX application, perform the following steps:
-
Navigate to the application directory:
-
Pull the latest images and restart the services: