> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noxus.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Serverless Containers

> Deploy Noxus on managed container runtimes (Cloud Run, Container Apps) using Terraform

This option runs Noxus services as managed containers while leveraging cloud-native managed data services. This architecture provides high availability and automatic scaling with reduced operational overhead.

## Supported Platforms

Noxus provides production-ready **Terraform** configurations in the [noxus-infra](https://github.com/noxus-ai/noxus-infra) repository for the following platforms:

<CardGroup cols={2}>
  <Card title="Google Cloud Run" icon="google">
    Deploy on GCP using Cloud Run, Cloud SQL (PostgreSQL), Memorystore (Redis),
    and Cloud Storage.
  </Card>

  <Card title="Azure Container Apps" icon="microsoft">
    Deploy on Azure using Container Apps, Azure Database for PostgreSQL, Azure
    Cache for Redis, and Blob Storage.
  </Card>
</CardGroup>

***

## Infrastructure as Code

We recommend using our Terraform modules to ensure a consistent and secure deployment. These modules handle the creation of container services, networking, IAM roles, and managed data services.

### Deployment Steps

1. Clone the [noxus-infra](https://github.com/noxus-ai/noxus-infra) repository.
2. Navigate to the `terraform/gcp/cloud-run` or `terraform/azure/container-apps` directory.
3. Configure your `terraform.tfvars` with your project details and desired resource sizes.
4. Run `terraform init` and `terraform apply`.

***

## Recommended Service Split

The platform is split into several independent container services to allow for granular scaling and resource allocation.

```mermaid theme={null}
flowchart TB
  IN[Public Ingress] --> FE[Noxus Frontend Container]
  IN --> BE[Noxus Backend Container]
  IN --> RE[Noxus Relays Container]

  BE --> W[Noxus Workers Container]

  BE --> PG[(Managed PostgreSQL + pgvector)]
  W --> PG

  BE --> RD[(Managed Redis)]
  W --> RD
  RE --> RD

  W --> CS[(Managed Object Storage)]
  BE --> CS
```

***

## Practical Notes

<AccordionGroup>
  <Accordion title="Noxus Workers on serverless" icon="bolt">
    Keep worker containers warm enough for your queue profile. Avoid pure
    scale-to-zero for latency-sensitive run execution. Consider setting a
    minimum number of instances for production workloads.
  </Accordion>

  <Accordion title="Relays" icon="webhook">
    Only enable Noxus Relays if you need webhook/event receiver endpoints for
    external integrations.
  </Accordion>
</AccordionGroup>

***

## Configuration Strategy

* **Secrets Management**: Inject sensitive credentials (database passwords, API keys) via cloud-native secret bindings (GCP Secret Manager or Azure Key Vault).
* **Environment Variables**: Keep non-sensitive configuration in the platform's environment variables.
* **Service Naming**: Maintain consistent names (`noxus-frontend`, `noxus-backend`, etc.) across all environments to simplify monitoring and operations.

<CardGroup cols={2}>
  <Card title="Environment Configuration" icon="sliders" href="/deployment/configuration/environment">
    Shared variable model across deployment options.
  </Card>

  <Card title="noxus-infra Repo" icon="github" href="https://github.com/noxus-ai/noxus-infra">
    Access Terraform modules and deployment scripts.
  </Card>
</CardGroup>
