Deployment Overview

The eTeamups Platform runs as a collection of Docker containers orchestrated by Docker Compose on a Hostinger VPS. This document describes the deployment architecture, the components involved, and the available deployment strategies.

Deployment Architecture

All backend services, databases, and the reverse proxy run as Docker containers managed by a single Docker Compose configuration. Docker images are built via GitHub Actions CI/CD pipelines and stored in GitHub Container Registry (GHCR). Nginx serves as the entry point, handling SSL termination and routing requests to the appropriate service containers.

Internet
  |
  v
Nginx (ports 80, 443, 18443)
  |-- /api/v1/auth/*          --> Auth Service (9000)
  |-- /api/v1/profile/*       --> Profile Service (9100)
  |-- /api/v1/organisation/*  --> Organisation Service (9107)
  |-- /api/v1/media/*         --> Media Service (9102)
  |-- /admin/*                --> Admin Portal (9103)
  |-- /                       --> Zeswa Hub (4000)
  |
MongoDB (27017)    Redis (6379)    Message Queue Worker (BullMQ)

Deployed Components

Component Description
MongoDB 7 Primary datastore (mongo:7-jammy)
Redis 7 Caching and BullMQ job queue (redis:7-alpine)
Auth Service Authentication and authorization (port 9000)
Profile Service User profile management (port 9100)
Organisation Service Organisation management (port 9107)
Media Service File and media handling (port 9102)
Message Queue Worker BullMQ background job processor
Admin Portal Administration interface (port 9103)
Zeswa Hub Frontend application (port 4000)
Nginx Reverse proxy and SSL termination

Environment Configuration

All services read their configuration from a docker.env file at the project root. This file contains database connection strings, Redis credentials, JWT secrets, API keys, and service-specific settings. A docker.env.example or docker.local.env file is provided as a template.

CI/CD Pipeline

GitHub Actions workflows defined in .github/workflows/ handle:

  • Building Docker images from the project Dockerfile.
  • Pushing images to GHCR under the ghcr.io/creativeaura/ namespace.
  • Triggering deployments to the production server.

Deployment Strategies

Docker Compose (Primary)

The primary deployment method uses Docker Compose to pull pre-built images from GHCR and run all services as containers. This is the recommended approach for production.

docker compose pull
docker compose up -d

PM2 (Alternative)

PM2 can be used as an alternative process manager when running services directly on the host without Docker. The project includes an ecosystem.config.js file for PM2 configuration. This approach compiles TypeScript to JavaScript and runs the built output under PM2.

npm run build
pm2 start ecosystem.config.js

Health Monitoring

A health check script is available at scripts/health-check.sh to verify that all services are running and responding correctly. Each service exposes health endpoints that the script queries to confirm availability.

SSL Termination

SSL termination is handled at the Nginx layer. Certificates are placed in the nginx/ssl/ directory, and Nginx is configured to redirect HTTP traffic to HTTPS. Self-signed certificates can be generated using scripts/generate-ssl.sh for development and testing purposes.