Skip to main content

Deployment Overview

Complete guide for deploying the Easy AppServer platform to production.

Architecture

┌─────────────────────────────────────────────────────────────────────┐
│ Load Balancer / Nginx │
│ (SSL Termination) │
└───────────────────────────────┬─────────────────────────────────────┘

┌───────────────────────┼───────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Shell │ │ AppServer │ │ Legacy │
│ (Frontend) │ │ (Backend) │ │ (C5) │
│ Port 3000 │ │ Port 8080 │ │ External │
└───────┬───────┘ │ Port 9090 │ └───────────────┘
│ └───────┬───────┘ ▲
│ │ │
└──────────────────────┼──────────────────────┘

┌──────────────────────────┼──────────────────────────┐
│ │ │
▼ ▼ ▼
┌─────────┐ ┌─────────────┐ ┌─────────────┐
│ Kratos │ │ OpenFGA │ │ Redis │
│(Identity)│ │ (AuthZ) │ │ (Cache) │
│4433/4434│ │ 8090/8091 │ │ 6379 │
└────┬────┘ └──────┬──────┘ └─────────────┘
│ │
└────────────┬───────────┘


┌─────────────┐
│ PostgreSQL │
│ (Database) │
│ 5432 │
└─────────────┘

Deployment Profiles

Profile 1: Standard (Docker Deployment)

Standard deployment with all required services for Docker-based app deployment.

ServicePurposeRequired
PostgreSQLDatabaseYes
RedisCacheYes
RabbitMQEvent busYes
KratosAuthenticationYes
OpenFGAAuthorizationYes
OTEL CollectorTelemetry backendYes
AppServerBackend APIYes
OrchestratorContainer managementYes
ShellFrontendYes
Legacy (C5)PHP backend proxyYes
# Start standard stack
docker-compose up -d postgres redis rabbitmq kratos openfga otel-collector
docker-compose up -d appserver orchestrator shell

Profile 2: With OAuth (Add Hydra)

Adds OAuth2/OIDC support for external authentication flows.

ServicePurposeRequired
All from StandardYes
HydraOAuth2/OIDCWhen OAuth needed
# Start with OAuth
docker-compose up -d postgres redis rabbitmq kratos hydra openfga otel-collector
docker-compose up -d appserver orchestrator shell

Profile 3: Full Stack (With Dashboards)

Complete deployment with metrics visualization and log querying.

ServicePurposeRequired
All from StandardYes
PrometheusMetrics storageOptional
LokiLog aggregationOptional
TempoTrace storageOptional
GrafanaDashboardsOptional
# Start full stack with dashboards
docker-compose up -d

Service Dependencies

Services must be started in order:

1. PostgreSQL        ──┐
├──▶ 2. db-migrate

3. kratos-migrate ◀──┤
4. hydra-migrate ◀──┤ (if using Hydra)
5. openfga-migrate ◀──┘

6. Redis ◀──┤
7. RabbitMQ ◀──┤
8. OTEL Collector ◀──┤

9. Kratos ◀──┤
10. Hydra ◀──┤ (optional)
11. OpenFGA ◀──┤

12. setup-openfga ◀──┤

13. AppServer ◀──┤
14. Orchestrator ◀──┤
15. Shell ◀──┘

Prerequisites

Required

  • Docker and Docker Compose v2+
  • 4GB+ RAM (8GB+ recommended)
  • 20GB+ disk space
  • Network access to container registry

For Production

  • Domain names with DNS configured
  • TLS/SSL certificates
  • Strong secrets (32+ characters each):
    • KRATOS_SECRETS_COOKIE
    • KRATOS_SECRETS_CIPHER
    • HYDRA_SYSTEM_SECRET
    • APPSERVER_SETTINGS_ENCRYPTION_KEY
  • PostgreSQL with SSL enabled
  • Backup strategy

Quick Start

# Clone repository
git clone https://github.com/easy-m/core6-poc.git
cd core6-poc/easy.appserver/docker

# Configure environment
cp .env.example .env
# Edit .env with your values

# Start infrastructure
docker-compose up -d

# Check status
docker-compose ps

# View logs
docker-compose logs -f

Documentation Topics

TopicDescription
Docker InfrastructureComplete Docker Compose setup
AppServer GuideBackend API deployment
Orchestrator GuideContainer orchestration
Shell GuideFrontend deployment
Environment ReferenceAll environment variables
Production DeploymentProduction best practices
Observability StackMonitoring and tracing

Port Reference

PortServiceDescription
5432PostgreSQLDatabase
6379RedisCache
5672RabbitMQMessage queue
15672RabbitMQManagement UI
4317OTEL CollectorgRPC telemetry
4318OTEL CollectorHTTP telemetry
4433KratosPublic API
4434KratosAdmin API
4444HydraPublic API (optional)
4445HydraAdmin API (optional)
8080AppServerHTTP/GraphQL
9090AppServergRPC
8090OpenFGAHTTP API
8091OpenFGAgRPC API
3000ShellFrontend

Required vs Optional Services

Always Required

ServiceWhy
PostgreSQLStores all application data
RedisCache, rate limiting, sessions
RabbitMQEvent bus for app communication
KratosUser authentication
OpenFGAPermission management
OTEL CollectorTelemetry backend (apps send logs/traces)
AppServerBackend API and business logic
OrchestratorDocker container management (for Docker deployments)
ShellUser interface
Legacy (C5)Backend proxy to existing PHP system

Optional

ServiceWhen to Include
HydraOAuth2/OIDC flows are needed
OathkeeperAPI gateway routing is needed
PrometheusMetrics storage and querying
GrafanaDashboards and visualization
LokiLog aggregation and querying
TempoDistributed trace storage

Next Steps

  1. Review Docker Infrastructure for setup details
  2. Configure Environment Variables
  3. Follow AppServer Guide for backend deployment
  4. Follow Shell Guide for frontend deployment
  5. Review Production Deployment for production checklist