Skip to content

Self-Hosted Setup

Mayo ASPM can be self-hosted using Docker Compose.

Prerequisites

  • Docker and Docker Compose
  • PostgreSQL database (external or containerized)
  • Domain names for the platform and services

Quick Start

git clone https://github.com/securelyprogramming/mayoaspm.com.git
cd mayoaspm.com
cp .env.example .env
# Edit .env with your database credentials and secrets
docker compose up -d

Services

Service Port Description
backend 8000 FastAPI API server
frontend 3000 Next.js web application
worker ARQ background worker
scanner 8000 Scan executor service
scanner-worker Scanner ARQ worker
edge (Caddy) 80/443 Reverse proxy with TLS
airflow 8080 DAG scheduler
redis 6379 Job queue

Environment Variables

Key variables in .env:

DATABASE_URL=postgres://user:pass@host:5432/dbname
REDIS_URL=redis://localhost:6379
SCANNER_SERVICE_URL=http://scanner:8000
WEBHOOK_SERVICE_URL=http://webhook:3000

See .env.example for the full list.

HTTPS Setup

Set ENABLE_HTTPS=1 in your deploy configuration. Caddy handles automatic TLS certificates via Let's Encrypt.