Skip to main content

Deployment Overview

Under Reviewv0.1.0-alpha

AxCom ships as a single Go binary packaged in a Docker image. The deployment system is built from composable Docker Compose stacks that communicate over a shared ecom-net network.

This section covers all deployment scenarios — from the cheapest single-VPS setup to a full self-hosted stack with observability.


Scenario Matrix

#NameStackTypical Use Case
0App onlyApp + external managed DBHobby / startup, cloud DB (Atlas, Supabase)
1App + MongoDBApp + local MongoDBSingle VPS, self-hosted NoSQL
2App + MongoDB + infra+ RabbitMQ + RedisGrowing team, async events, distributed cache
3App + PostgreSQLApp + local PostgreSQLSingle VPS, self-hosted SQL
4App + PostgreSQL + infra+ RabbitMQ + RedisGrowing team, SQL + messaging
5+ Monitoring (self-hosted)+ Prometheus + Loki + Tempo + GrafanaFull observability, VPS or bare metal
6+ Monitoring (Grafana Cloud)+ OTel Collector → Grafana CloudLow-cost observability, no backend to run

Monitoring (scenarios 5 and 6) is an independent stack that layers on top of any of the database scenarios.


Architecture Tiers

Tier 1 — Minimal (Scenarios 0–1)

The app uses an in-memory event bus and memory-only L1 cache. No external dependencies beyond the database.

Tier 2 — With Infra (Scenarios 2, 4)

  • RabbitMQ handles async domain events (order placed, inventory updated, etc.)
  • Redis provides a distributed L2 cache in front of the database

Tier 3 — With Monitoring (Scenario 5)

Tier 3 — Grafana Cloud Variant (Scenario 6)

Scenario 6 replaces the three local backends with a single Grafana Cloud endpoint. Only the OTel Collector runs locally.


How the Stacks Layer

All stacks share a single external Docker network (ecom-net). You start them independently and they discover each other by service name.

docker network create ecom-net # one-time setup

# 1. Start infra (optional)
cd deployments/rabbitmq-redis && docker compose up -d

# 2. Start monitoring (optional)
cd deployments/monitoring && docker compose up -d

# 3. Start the app + database
cd deployments/postgres && docker compose up -d

The app container joins both ecom-net (to reach RabbitMQ, Redis, the OTel Collector) and its default Compose network (to reach the database container).


Choosing a Database

MongoDBPostgreSQL
SchemaFlexible document modelStrict relational schema
MigrationsAutomatic (schema-on-write)Requires migrate up on deploy
TransactionsRequires replica set mode (rs0)Native
Managed servicesMongoDB Atlas (free tier available)Supabase, Neon, Railway

Both work identically from the application's perspective. Switch by using a different deployment folder.


Next Steps