Loading...
Loading...
Create a haloy.yaml configuration file for deploying applications with haloy. Use when the user says "create haloy config", "add haloy.yaml", "configure for haloy", "set up haloy deployment", or "prepare for haloy". Supports single-target and multi-target deployments with optional self-hosted databases. Not for creating Dockerfiles (use the dockerize skill), multi-environment deployments, or docker-compose/Kubernetes setups.
npx skill4agent add haloydev/agent-skills haloy-confighaloy.yaml"No Dockerfile found in this project. Haloy deploys Docker containers, so you'll need a Dockerfile first. Would you like me to create one using theskill?"dockerize
package.jsonpyproject.tomlrequirements.txtPipfilego.modCargo.tomlGemfilecomposer.json| Framework | Indicator | Default Port |
|---|---|---|
| Next.js | | 3000 |
| TanStack Start | | 3000 |
| Express/Node.js | | 3000 |
| Vite | | 5173 (dev) / 3000 (prod) |
| Django | | 8000 |
| FastAPI | | 8000 |
| Flask | | 5000 |
| Go | | 8080 |
| Rust | | 8080 |
| Ruby/Rails | | 3000 |
| PHP/Laravel | | 8000 |
| Default | Unknown framework | 8080 |
EXPOSE| Indicator | Database Type |
|---|---|
| Check schema for provider |
| Check config for driver |
| PostgreSQL |
| MySQL |
| SQLite (no service needed) |
| Check config for dialect |
| PostgreSQL |
| Check config for driver |
| Check settings for database |
| Check |
datasource db {
provider = "postgresql" // or "mysql", "sqlite"
url = env("DATABASE_URL")
}namepackage.json~/.config/haloy/client.yaml# Example client.yaml structure
servers:
example.haloy.dev:
token_env: HALOY_API_TOKEN_example_HALOY_DEV
prod.mycompany.com:
token_env: HALOY_API_TOKEN_PRODexample.haloy.dev"I found these configured haloy servers. Which one would you like to deploy to?"
- example.haloy.dev
- prod.mycompany.com
- Enter a different server
which haloyhaloy --version"What is your haloy server URL? (e.g., haloy.yourserver.com)"
"No haloy servers configured. To deploy with haloy, you'll need to install the CLI and add a server. See: https://haloy.dev/docs/client-installation"
www."Remember to configure DNS with your domain provider. Point your domain(s) to your haloy server's IP address using an A record, or use a CNAME record if your server has a domain name."
EXPOSE/health/healthz/api/health/_health//"I detected database dependencies ([detected type]). Would you like to add a self-hosted database service, or will you use an external provider (Supabase, Neon, RDS, etc.)?"
- Add self-hosted database
- Use external provider (I'll configure DATABASE_URL myself)
database| Database | Image | Port | Volume Path |
|---|---|---|---|
| PostgreSQL | | 5432 | |
| MySQL | | 3306 | |
DATABASE_URLtargetstargetsname: "my-app"
server: "haloy.yourserver.com"name: "my-app"
server: "haloy.yourserver.com"
domains:
- domain: "my-app.example.com"
aliases:
- "www.my-app.example.com"
port: "3000"
health_check_path: "/health"name: "my-app"
server: "haloy.yourserver.com"
domains:
- domain: "my-app.example.com"
port: "3000"
env:
- name: "NODE_ENV"
value: "production"
- name: "DATABASE_URL"
value: "postgres://user:pass@db:5432/myapp"name: "my-app"
server: "haloy.yourserver.com"
domains:
- domain: "my-app.example.com"
volumes:
- "app-data:/app/data"server: "haloy.yourserver.com"
env:
- name: POSTGRES_USER
value: "postgres"
- name: POSTGRES_PASSWORD
value: "change-me-in-production"
- name: POSTGRES_DB
value: "my_app"
targets:
postgres:
preset: database
image:
repository: postgres:17
port: 5432
volumes:
- postgres-data:/var/lib/postgresql/data
my-app:
domains:
- domain: "my-app.example.com"
port: 3000
env:
- name: DATABASE_URL
value: "postgres://postgres:change-me-in-production@postgres:5432/my_app"
- name: NODE_ENV
value: "production"# Base settings inherited by all targets
image:
repository: "my-app"
tag: "latest"
port: "3000"
targets:
production:
server: "prod.haloy.com"
domains:
- domain: "my-app.com"
replicas: 2
staging:
server: "staging.haloy.com"
domains:
- domain: "staging.my-app.com"
replicas: 1nameserverimagedomainsdomainaliasesporthealth_check_pathenvvolumesreplicasdeployment_strategytargetspresethaloy.yamlhaloy.yaml.dockerignorehaloy.yamlhaloy validate-confighaloy deploy# Shell script
curl -fsSL https://sh.haloy.dev/install-haloy.sh | sh
# Homebrew
brew install haloydev/tap/haloy
# npm/pnpm/bun
npm install -g haloy
pnpm add -g haloy
bun add -g haloyreferences/examples.md