Afunana Architecture & Deployment

Deployment Overview

Afunana is deployed as a set of Docker containers on a single Linux server. No runtimes, packages, or system services are installed on the host beyond Docker itself.

ContainerRoleNotes
afunana-appApplication server, web UI, AI pipelineAlways running
sqlserverSQL Server 2022 databaseAlways running
caddyReverse proxy with automatic TLSOptional — not started when using an external proxy
Host requirements: Docker and Docker Compose. Supported on RHEL 9, AlmaLinux 9, Rocky 9, Ubuntu 22/24, and Debian 12.

Proxy Options

Two deployment modes are supported, depending on whether the customer provides their own reverse proxy.

Option A — Built-in Caddy proxy

The included Caddy container handles TLS certificates (Let's Encrypt) and routes all traffic. Users connect on port 443.

Customer Network Docker Host Users Caddy auto TLS :443 container App FastAPI + SPA container SQL 2022 container Data Volume IBM i (IBMi/zOS) Separate machine HTTPS :443 JDBC + FTP

Option B — Customer's existing proxy

The Caddy container is not started. The customer's proxy (F5, nginx, HAProxy, etc.) forwards traffic to 127.0.0.1:18080.

Customer Network Docker Host Users Your Proxy F5 / nginx / HAProxy customer infrastructure App FastAPI + SPA container SQL 2022 container Data Volume IBM i (IBMi/zOS) Separate machine HTTPS :18080 JDBC + FTP

Network Requirements

Inbound

PortModeBinding
443, 80Built-in Caddy0.0.0.0 (public)
18080External proxy127.0.0.1 (loopback only)

Outbound

DestinationPortRequired
IBM i8471 (JDBC), 21 (FTP)Yes
LLM provider API443Only if using a cloud LLM

External Proxy Configuration

SettingValue
Upstreamhttp://127.0.0.1:18080
Path/ — all traffic (API and web UI share one port)
WebSocketEnable for /api/chat/*
HeadersX-Forwarded-For, X-Forwarded-Proto

IBM i Connectivity

ProtocolPortPurpose
JDBC (jt400)8471SQL queries, CL commands, job submission
FTP21Source extraction, SAVF transfer

A small extraction library (TTDOC) is installed in its own library on the IBM i. It reads source members and metadata — it does not modify customer data.

Security