# Example Project - Using DevOps CLI

This is an example project demonstrating how to use the DevOps CLI.

## Project Structure

```
example-app/
├── devops.yml           # DevOps CLI configuration
├── Dockerfile           # Application Dockerfile
├── docker-compose.yml   # Local development compose file
├── kubernetes/          # Kubernetes manifests
│   ├── base/
│   │   ├── deployment.yaml
│   │   ├── service.yaml
│   │   └── ingress.yaml
│   └── overlays/
│       ├── staging/
│       └── production/
├── charts/              # Helm charts
│   └── myapp/
├── terraform/           # Infrastructure as Code
│   ├── main.tf
│   ├── variables.tf
│   └── outputs.tf
├── .github/
│   └── workflows/
│       └── deploy.yml
└── src/                 # Application source code
```

## Quick Start

```bash
# Initialize the project
devops init

# Check environment
devops doctor

# Start development environment
devops up

# Build production image
devops build --tag v1.0.0

# Deploy to Kubernetes
devops deploy --namespace production
```

## Configuration

Edit `devops.yml` to customize:

```yaml
project:
  name: myapp
  version: 1.0.0

docker:
  image: myapp
  tag: latest
  registry: ghcr.io/username

kubernetes:
  namespace: production

helm:
  chart: ./charts/myapp
  release: myapp

ci:
  provider: github
```

## Commands

| Command | Description |
|---------|-------------|
| `devops init` | Initialize project structure |
| `devops doctor` | Check dependencies |
| `devops build` | Build Docker image |
| `devops up` | Start local environment |
| `devops down` | Stop services |
| `devops deploy` | Deploy to Kubernetes |
| `devops rollback` | Rollback deployment |
| `devops logs` | View logs |
| `devops status` | Check status |
| `devops infra init` | Initialize Terraform |
| `devops infra apply` | Apply infrastructure |
| `devops ci run` | Run CI pipeline |
