Skip to main content

Deployment options

Every deployment runs the same gateway. What differs is how much of the surrounding infrastructure you want the asset to own, and whether you run the gateway as one process or as the three components it can be split into (the data-plane gateway, the management backend and the static Admin UI).

AssetShapeOwns the database and RedisBest for
Dev mode spanway-ai-devOne container with the gateway and a built-in PostgreSQLYes, inside the same container, with no Redis and no backupsTrying everything on a laptop in three commands, never production
Docker compose filesOne gateway container with Postgres beside itPostgres only, as a container on the same host. No Redis, so one gateway instanceLocal evaluation, one-box installs, CI
All-in-one Helm chart spanway-helmOne Deployment running the full proxy imageOptional, through bundled Bitnami subchartsKubernetes clusters where one process per pod is fine
Componentised Helm chart spanwayThree Deployments, one Job, optional LensNo, you bring bothProduction Kubernetes with separate scaling for data plane and management
Terraform stacks for AWS, GCP and AzureThe componentised layout on managed computeYes, managed database, cache and object storeTeams that want the whole environment from Terraform
Terraform providerManages objects inside a running gatewayNot applicableKeys, teams, models and guardrails as code, on any deployment

Cloud marketplace listings on AWS, Azure and Google Cloud are planned and not available yet, so none of them is an install option today. The componentised chart already has a marketplace mode as groundwork for the planned AWS listing, and each marketplace page describes how its listing will work.

The container images page lists every image the release pipeline builds and what each one runs, which is the first thing to check when a chart or stack value asks for an image name.

A real-world scenario​

A platform team has a week to put a gateway in front of 40 internal apps on their EKS cluster. They read this page, try the quickstart compose file on a laptop in an afternoon, then install the componentised Helm chart against their managed Postgres, because the data plane must scale apart from the Admin UI.

Steps​

  1. Pick the asset from the table above. For a first look on a laptop, use dev mode, or the quickstart compose file to see the gateway beside its own Postgres.

  2. Install it by following its page.

  3. Check that the gateway is up and its database is reachable.

    curl http://localhost:4000/health/liveliness
    curl http://localhost:4000/health/readiness
  4. Open http://localhost:4000/ui, sign in as admin with the master key, and check that the Models + Endpoints page loads.

Expected result​

/health/liveliness answers "I'm alive!", /health/readiness answers "status": "healthy" with "db": "connected", and the Admin UI opens on its home page.

One process or three components​

The classic image (spanway-ai) runs the whole proxy, Admin UI included, in one container that listens on port 4000. The all-in-one chart and the quickstart compose file both use it.

The componentised layout splits that into spanway-gateway (the LLM data plane on 4000), spanway-backend (the management API and Admin UI backend on 4001) and spanway-ui (a static export served by nginx on 3000), with a slim spanway-migrations image that runs the schema migration once per release. An ingress or load balancer routes data-plane prefixes to the gateway, UI assets to the UI and everything else to the backend. The componentised chart and all three Terraform stacks use this layout. Pick it when the data plane needs to scale independently of the Admin UI, when you want the management API behind a different network policy, or when you want the migration to run from a dedicated image rather than from a proxy pod.

How schema migrations run in each asset​

The gateway needs its Postgres schema in place before it serves traffic. Each asset handles that differently, and this is the part most worth understanding before a first install.

AssetWho runs the migrationWhen
Docker composeThe gateway container itself at startupEvery start, unless DISABLE_SCHEMA_UPDATE is set
All-in-one chartA Job running spanway-container migrate from the proxy imageArgo CD PreSync hook by default, Helm pre-install,pre-upgrade hook when migrationJob.hooks.helm.enabled is true
Componentised chartA Job running the spanway-migrations imageHelm pre-install,pre-upgrade hook by default, Argo CD PreSync when migrationJob.hooks.argocd.enabled is true
Terraform stacksA one-off task, job or Container Apps job from the spanway-migrations imageTriggered by terraform apply through a local-exec provisioner, so the machine running Terraform needs the cloud CLI. The migration_run_command output re-runs it by hand

Which one to start with​

If you are evaluating, use the quickstart compose file. It is two containers and a .env file.

If you already run Kubernetes and want the shortest path to a cluster install, use the all-in-one chart with db.deployStandalone: true to try it, then switch to db.useExisting: true against a managed Postgres before production. The bundled Bitnami images are pinned to archived builds and no longer receive updates, so they are a getting-started convenience rather than a production database.

If you are building a production platform on Kubernetes, use the componentised chart. It refuses to render without a master key Secret and a writer database, which is the right posture for a shared gateway.

If you want the cloud account set up too, use the Terraform stack for your cloud. Each stack creates its own network, managed Postgres with a reader, managed Redis, an object store and a public entrypoint, and deploys the three components on ECS Fargate, Cloud Run or Container Apps. The GCP stack can also provision only the dependencies for a GKE install.

Whichever path you take, the Terraform provider manages what lives inside the gateway afterwards.

Errors​

What you seeWhat it meansFix
The gateway restarts in a loop at first startThe schema migration failed, usually a wrong DATABASE_URL or a database user without the right to create tables.Read the first error in the gateway log, see the log reference.
/health/readiness reports the database as not connectedThe gateway cannot reach Postgres.Check the host, port, password and network policy.
The Admin UI refuses the master keyThe key in the deployment differs from the one you typed.Read it back from the Secret or the secret store the asset used.

Logs​

Every asset writes the gateway log to the container output, which is where the first error of a failed start shows up. With Docker run docker compose logs spanway, with Kubernetes kubectl logs on the gateway pod or the migration Job, and on the Terraform stacks the cloud's log service, which the Terraform page names per cloud.

LevelLineMeaningAction
OutputSpanway proxy refused to start: ...The master key is unset, empty or a known default.Set a generated key, see proxy refuses to start.
INFOMigration job completed successfully.The migration Job or task of a chart or Terraform stack applied every migration.None.
ERRORMigration job failed after retries.The migration Job or task could not apply the migrations.Read the Prisma error above it, see image errors.

The log reference lists every gateway line.