---
name: DeployConfig
lang: go
domain: infra
version: "1.0.0"
algebraic: product
definition: "type DeployConfig struct { AppName, LocalDir, RemoteDir, BinaryName, BuildCmd, ServiceUser string; Port int; HealthPath string; Env map[string]string }"
description: "Parametriza un deploy de app a un VPS remoto. Agrupa nombre, rutas, build, servicio, puerto, health check y env vars."
tags: [deploy, config, vps, remote, infra]
uses_types: []
file_path: "functions/infra/deploy_config.go"
---

## Ejemplo

```go
cfg := DeployConfig{
    AppName:     "dag_engine",
    LocalDir:    "apps/dag_engine",
    RemoteDir:   "/opt/apps/dag_engine",
    BinaryName:  "dag_engine",
    BuildCmd:    "CGO_ENABLED=0 GOOS=linux go build -o dag_engine .",
    ServiceUser: "deploy",
    Port:        8080,
    HealthPath:  "/api/health",
    Env:         map[string]string{"DB_PATH": "/opt/apps/dag_engine/data/ops.db"},
}
```

## Notas

Usado por los pipelines `setup_vps_app` y `deploy_app_remote`. El campo `BuildCmd` se ejecuta localmente con `bash -c` en el directorio `LocalDir`. Si `HealthPath` está vacío o `Port` es 0, se omite el health check.
