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.
| Service | Purpose | Required |
|---|---|---|
| PostgreSQL | Database | Yes |
| Redis | Cache | Yes |
| RabbitMQ | Event bus | Yes |
| Kratos | Authentication | Yes |
| OpenFGA | Authorization | Yes |
| OTEL Collector | Telemetry backend | Yes |
| AppServer | Backend API | Yes |
| Orchestrator | Container management | Yes |
| Shell | Frontend | Yes |
| Legacy (C5) | PHP backend proxy | Yes |
# 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.
| Service | Purpose | Required |
|---|---|---|
| All from Standard | Yes | |
| Hydra | OAuth2/OIDC | When 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.
| Service | Purpose | Required |
|---|---|---|
| All from Standard | Yes | |
| Prometheus | Metrics storage | Optional |
| Loki | Log aggregation | Optional |
| Tempo | Trace storage | Optional |
| Grafana | Dashboards | Optional |
# 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_COOKIEKRATOS_SECRETS_CIPHERHYDRA_SYSTEM_SECRETAPPSERVER_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
| Topic | Description |
|---|---|
| Docker Infrastructure | Complete Docker Compose setup |
| AppServer Guide | Backend API deployment |
| Orchestrator Guide | Container orchestration |
| Shell Guide | Frontend deployment |
| Environment Reference | All environment variables |
| Production Deployment | Production best practices |
| Observability Stack | Monitoring and tracing |
Port Reference
| Port | Service | Description |
|---|---|---|
| 5432 | PostgreSQL | Database |
| 6379 | Redis | Cache |
| 5672 | RabbitMQ | Message queue |
| 15672 | RabbitMQ | Management UI |
| 4317 | OTEL Collector | gRPC telemetry |
| 4318 | OTEL Collector | HTTP telemetry |
| 4433 | Kratos | Public API |
| 4434 | Kratos | Admin API |
| 4444 | Hydra | Public API (optional) |
| 4445 | Hydra | Admin API (optional) |
| 8080 | AppServer | HTTP/GraphQL |
| 9090 | AppServer | gRPC |
| 8090 | OpenFGA | HTTP API |
| 8091 | OpenFGA | gRPC API |
| 3000 | Shell | Frontend |
Required vs Optional Services
Always Required
| Service | Why |
|---|---|
| PostgreSQL | Stores all application data |
| Redis | Cache, rate limiting, sessions |
| RabbitMQ | Event bus for app communication |
| Kratos | User authentication |
| OpenFGA | Permission management |
| OTEL Collector | Telemetry backend (apps send logs/traces) |
| AppServer | Backend API and business logic |
| Orchestrator | Docker container management (for Docker deployments) |
| Shell | User interface |
| Legacy (C5) | Backend proxy to existing PHP system |
Optional
| Service | When to Include |
|---|---|
| Hydra | OAuth2/OIDC flows are needed |
| Oathkeeper | API gateway routing is needed |
| Prometheus | Metrics storage and querying |
| Grafana | Dashboards and visualization |
| Loki | Log aggregation and querying |
| Tempo | Distributed trace storage |
Next Steps
- Review Docker Infrastructure for setup details
- Configure Environment Variables
- Follow AppServer Guide for backend deployment
- Follow Shell Guide for frontend deployment
- Review Production Deployment for production checklist
Related Topics
- Getting Started - Development setup
- Configuration - Application configuration
- Infrastructure - Infrastructure components