Metadata-Version: 2.4
Name: octopize.deploy_tool
Version: 0.3.0
Summary: Deployment configuration tool for Octopize Avatar platform
Project-URL: Homepage, https://octopize.io
Project-URL: Documentation, https://docs.octopize.io/docs/deploying/self-hosted
Project-URL: Repository, https://github.com/octopize/avatar-deployment
Project-URL: Issues, https://github.com/octopize/avatar-deployment/issues
Author-email: Octopize <contact@octopize.io>
License: MIT
Keywords: avatar,configuration,deployment,octopize
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Installation/Setup
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.13
Requires-Dist: jinja2>=3.1.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# Octopize Avatar Deployment Tool

Automated configuration tool for deploying Octopize Avatar platform using Docker Compose.

## Quick Start

```bash
# Install
pip install octopize-avatar-deploy

# Run interactive configuration
octopize-avatar-deploy --output-dir /app/avatar

# Deploy
cd /app/avatar
docker compose down --volumes --remove-orphans  # Clean old containers if redeploying
docker compose up -d
```

## Usage Options

### Interactive Mode (Default)

```bash
octopize-avatar-deploy --output-dir /app/avatar
```

### Non-Interactive Mode

```bash
# Create config file
cat > config.yaml << EOF
PUBLIC_URL: avatar.example.com
ENV_NAME: prod
ORGANIZATION_NAME: MyCompany
EOF

# Run with config
octopize-avatar-deploy --output-dir /app/avatar --config config.yaml --non-interactive
```

## Command Line Options

```
--output-dir DIR           Output directory (default: current directory)
--config FILE              YAML configuration file
--non-interactive          Non-interactive mode (requires config file)
--template-from PATH       Use local templates instead of downloading from GitHub
--save-config              Save configuration to deployment-config.yaml
--verbose                  Show detailed output
```

## What Gets Generated

```
/app/avatar/
├── .env                            # Environment configuration
├── docker-compose.yml              # Docker services
├── nginx/nginx.conf                # Nginx config
├── authentik/
│   ├── octopize-avatar-blueprint.yaml
│   ├── custom-templates/           # Email templates
│   └── branding/                   # Logo, favicon, background
└── .secrets/                       # Generated secrets (22 files)
```

## Deployment Steps

1. **Generate configuration:**

   ```bash
   octopize-avatar-deploy --output-dir /app/avatar
   ```

2. **Review generated files:**

   ```bash
   cd /app/avatar
   cat .env
   ls -la .secrets/
   ```

3. **Add TLS certificates (production):**

   ```bash
   mkdir -p tls
   cp /path/to/fullchain.pem tls/
   cp /path/to/privkey.pem tls/
   ```

4. **Start services:**

   ```bash
   docker compose down --volumes --remove-orphans
   docker compose up -d
   ```

5. **Verify deployment:**

   ```bash
   docker compose ps
   docker compose logs -f
   curl https://avatar.example.com/api/health
   ```

## Troubleshooting

### "bind source path does not exist" error

Old containers from previous deployment. Solution:

```bash
docker compose down --volumes --remove-orphans
docker compose up -d
```

### Templates not downloading

```bash
rm -rf .avatar-templates/
octopize-avatar-deploy --output-dir /app/avatar --verbose
```

## Development

```bash
# Clone
git clone https://github.com/octopize/avatar-deployment
cd avatar-deployment/deployment-tool

# Install dependencies
just install

# Run tests
just test-all

# Run locally
just run-interactive-local
```
