Skip to content

Deployment

aleksandr.artamokhov edited this page May 24, 2026 · 2 revisions

Deployment

Docker Compose (default)

cp -n .env.example .env
docker compose up -d --build

Persistent state: host directory ./data/app/data (products, pipeline DB, secrets, LLM logs).

Production script

scripts/deploy.sh:

./scripts/deploy.sh --public-url https://magic-ai-factory.com

For magic-ai-factory.com, ensure .env contains AIFACTORY_DEMO_READONLY=1 (append-only via fill_production_env.py when using --public-url, or set manually). See Public-Demo.

Uses scripts/fill_production_env.py to append only missing keys:

  • NEXT_PUBLIC_SITE_URL, AIFACTORY_CORS_ORIGINS
  • AIFACTORY_FIREWALL_RULES_FERNET_KEY (when possible)
  • AIFACTORY_SANDBOX_PREVIEW_NETWORK_ISOLATION=1 default

Then docker compose build + up -d app.

Public hostname (this fleet)

Production: magic-ai-factory.com — nginx → Compose 9080.

Full notes: docs/production-domain.md

AIMarket Hub — modelmarket.dev (TLS)

Federation hub on https://modelmarket.dev (nginx :443 → Docker hub 127.0.0.1:9083).

sudo CERTBOT_EMAIL=you@example.com ./scripts/setup-modelmarket-ssl.sh

Or: docs/production-modelmarket-dev.md — certbot + certbot.timer auto-renewal.

DNS: modelmarket.dev and www → same host as the factory.

Static storefront deploy (optional)

After DevOps stage: Vercel / Netlify / Cloudflare Pages tokens in .env and data/state/.../auto_publish.json.

Guide: docs/auto-publish.md

Full-stack cloud backends

Railway / Fly / Cloud Run layout for full_software products:

docs/deploy-full-software-cloud.md

Configuration layers

YAML fragments + admin overlay — see docs/configuration.md and wiki Documentation-Index.

Health check

curl -s http://127.0.0.1:9081/api/health
docker compose ps app

Entrypoint watchdog restarts uvicorn on zombie/dead health failures.

Clone this wiki locally