Files
buque/docs/QUICK_START.md
2025-11-02 01:39:56 +01:00

120 líneas
2.1 KiB
Markdown

# Buque Docker Compose Manager
## Quick Links
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Commands](#commands)
- [Examples](#examples)
- [Configuration](#configuration)
## Installation
### Requirements
- Go 1.21+
- Docker 20.10+
- Docker Compose V2
### Install from source
```bash
git clone https://github.com/yourusername/buque.git
cd buque
make install
```
## Quick Start
```bash
# Initialize
buque init
# Deploy nginx-proxy
buque proxy deploy
# Add environment
buque env add myapp /path/to/myapp
# Start environment
buque up myapp
# Monitor containers
buque stats --continuous
```
## Commands
| Command | Description |
|---------|-------------|
| `buque init` | Initialize configuration |
| `buque env add <name> <path>` | Add environment |
| `buque env list` | List environments |
| `buque up [env...]` | Start environments |
| `buque down [env...]` | Stop environments |
| `buque restart [env...]` | Restart environments |
| `buque update [env...]` | Update environments |
| `buque stats [env]` | Show statistics |
| `buque logs <env>` | View logs |
| `buque ps [env...]` | List containers |
| `buque proxy deploy` | Deploy nginx-proxy |
| `buque pull [env...]` | Pull images |
| `buque prune` | Clean up resources |
## Examples
### Basic docker-compose.yml with nginx-proxy
```yaml
version: '3.8'
services:
web:
image: nginx:alpine
expose:
- "80"
environment:
- VIRTUAL_HOST=example.com
- LETSENCRYPT_HOST=example.com
networks:
- nginx-proxy
labels:
- "buque.environment=myapp"
networks:
nginx-proxy:
external: true
```
### Monitoring
```bash
# Real-time stats
buque stats --continuous --interval 2
# Sort by memory
buque stats --sort memory
# Environment-specific
buque stats webapp
```
## Configuration
Default location: `~/.buque/config.yaml`
```yaml
environments:
- name: webapp
path: /path/to/webapp
enabled: true
nginx_proxy:
enabled: true
network_name: nginx-proxy
http_port: 80
https_port: 443
ssl_enabled: true
```
## License
MIT License - see [LICENSE](LICENSE) for details