<!-- source: https://deepwiki.com/MervinPraison/PraisonAI/9.2-cloud-deployment -->

# Cloud Deployment

- docker/Dockerfile
- docker/Dockerfile.chat
- docker/Dockerfile.dev
- docker/Dockerfile.ui
- docker/README.md
- src/praisonai-agents/pyproject.toml
- src/praisonai-agents/uv.lock
- src/praisonai/praisonai.rb
- src/praisonai/praisonai/cli/main.py
- src/praisonai/praisonai/deploy.py
- src/praisonai/praisonai/version.py
- src/praisonai/pyproject.toml
- src/praisonai/uv.lock

This document covers PraisonAI's cloud deployment capabilities, including containerization, Google Cloud Run deployment, and scheduled deployment automation. For local Docker deployment, see [Docker Deployment](/MervinPraison/PraisonAI/8.1-consolidated-parameters). For development environment setup, see [Development Environment](/MervinPraison/PraisonAI/8.3-environment-variables).

## Overview

PraisonAI provides comprehensive cloud deployment infrastructure through the `CloudDeployer` class and Docker containerization. The framework supports automated deployment to Google Cloud Run with built-in scheduling capabilities and multi-service container orchestration.

## Cloud Deployment Architecture

The following diagram shows the high-level cloud deployment architecture:

```

```

Sources: [src/praisonai/praisonai/deploy.py6-185](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/deploy.py#L6-L185) [docker/README.md1-264](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/README.md?plain=1#L1-L264) [src/praisonai/praisonai/cli.py322-326](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/cli.py#L322-L326)

## Google Cloud Run Deployment Process

### CloudDeployer Implementation

The `CloudDeployer` class handles the complete Google Cloud Run deployment pipeline:

```

```

### Deployment Commands Sequence

The deployment process executes the following command sequence:

Sources: [src/praisonai/praisonai/deploy.py136-150](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/deploy.py#L136-L150) [src/praisonai/praisonai/deploy.py153-180](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/deploy.py#L153-L180)

### Environment Configuration

The `CloudDeployer` sets essential environment variables:

```

```

Sources: [src/praisonai/praisonai/deploy.py92-96](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/deploy.py#L92-L96) [src/praisonai/praisonai/deploy.py131-134](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/deploy.py#L131-L134)

## Docker Container Services

### Multi-Service Architecture

PraisonAI provides four distinct Docker configurations for different deployment scenarios:

### Container Configuration Details

Each container shares common configuration patterns:

```

```

Sources: [docker/Dockerfile1-45](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/Dockerfile#L1-L45) [docker/Dockerfile.ui1-33](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/Dockerfile.ui#L1-L33) [docker/Dockerfile.chat1-33](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/Dockerfile.chat#L1-L33) [docker/Dockerfile.dev1-47](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/Dockerfile.dev#L1-L47)

### Directory Management Solution

The Docker configuration solves directory management issues by centralizing all PraisonAI files:

```

```

Sources: [docker/README.md54-74](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/README.md?plain=1#L54-L74) [docker/Dockerfile13-14](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/Dockerfile#L13-L14) [docker/Dockerfile27-29](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/Dockerfile#L27-L29)

## Scheduled Deployment System

### DeploymentScheduler Architecture

The `DeploymentScheduler` class provides automated deployment scheduling:

```

```

### Schedule Expression Formats

The `ScheduleParser` supports multiple schedule formats:

Sources: [src/praisonai/praisonai/scheduler.py74-151](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/scheduler.py#L74-L151) [src/praisonai/praisonai/scheduler.py35-73](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/scheduler.py#L35-L73)

### CLI Integration

Scheduled deployment is triggered through the CLI with optional configuration:

```

```

Sources: [src/praisonai/praisonai/cli.py265-326](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/cli.py#L265-L326) [src/praisonai/praisonai/scheduler.py189-215](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/scheduler.py#L189-L215)

## Configuration Management

### Environment Variable Hierarchy

PraisonAI uses a priority-based environment variable system:

### Docker Environment Configuration

Container services use consistent environment variable patterns:

```

```

Sources: [docker/README.md76-109](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/README.md?plain=1#L76-L109) [src/praisonai/praisonai/deploy.py94-96](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/src/praisonai/praisonai/deploy.py#L94-L96) [docker/Dockerfile27-29](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/Dockerfile#L27-L29)

## Production Deployment Considerations

### Health Checks and Monitoring

All Docker services include health check configurations:

```

```

### Security Features

- Non-root user execution where possible
- Minimal base image ( python:3.11-slim )
- No unnecessary packages installed
- Environment variable-based configuration
- Volume mounting for persistent data

### Resource Management

Production deployments should consider:

Sources: [docker/README.md110-263](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/README.md?plain=1#L110-L263) [docker/README.md224-247](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/docker/README.md?plain=1#L224-L247)
