Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/upsun/skills/upsun/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Upsun is a git-driven cloud application platform. Key concepts:
- **Environments = branches.** Every Git branch can become a live environment with its own apps, services, and data. Environments form a parent/child tree.
- **Inheritance.** Child environments inherit configuration from the parent. When branching, the child gets a complete copy of the parent's data (databases, files) unless disabled.
- **Build vs runtime.** The build hook runs in an isolated container with internet access but no access to services. After build, the app filesystem becomes **read-only**. Services (databases, caches) are only available during the deploy hook and at runtime.
- **Configuration** lives in `.upsun/config.yaml` with three top-level keys: `applications`, `services`, `routes`. See [references/config.md](references/config.md).
- **Configuration** lives in `.upsun/config.yaml` with three top-level keys: `applications`, `services`, `routes`. See [references/config.md](references/config.md) for general templates, and [references/config/generated-index.md](references/config/generated-index.md) for per-language and per-framework starters.
- **Relationship env vars.** When an app declares a relationship to a service, env vars are auto-generated using the **relationship name** (not service name) as prefix, uppercased. E.g., a relationship named `database` exposes `$DATABASE_HOST`, `$DATABASE_PORT`, `$DATABASE_USERNAME`, etc. These are available at **runtime only**, not during the build.
- **`.environment` file.** A shell script at the app root, sourced at runtime, used to construct derived env vars (e.g., `DATABASE_URL`) from the auto-generated ones.

Expand Down Expand Up @@ -88,7 +88,7 @@ upsun project:create

Run `upsun init` in the project root — it generates `.upsun/config.yaml` (runtime, services, routes) and an `.environment` script if services are detected.

See [references/config.md](references/config.md) for a minimal working template and common service examples.
See [references/config.md](references/config.md) for a minimal working template and common service examples. If the user's language or framework is known, also load the matching file from the [references/config index](references/config/generated-index.md).

Key points for the config:
- For Node.js and PHP apps, set `build.flavor: none` and manage dependencies explicitly in the build hook.
Expand Down
9 changes: 9 additions & 0 deletions plugins/upsun/skills/upsun/references/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,12 @@ Services have `"service": true`; runtimes have `"service": false`.
- For PHP apps, set `build.flavor: none` and use `composer install --no-dev --no-interaction --optimize-autoloader` in the build hook.
- Relationship names become the env var prefix (uppercased). The vars are runtime-only.
- Run `upsun init` to auto-detect your stack and generate a starter config.

---

## Framework and language templates

For per-language and per-framework starter configs (Node.js, PHP, Python, Go, Ruby,
Next.js, Django, WordPress, etc.) see the templates in `config/`.
The index at [references/config/generated-index.md](config/generated-index.md) lists
every available file. Load the relevant file when the user's stack is known.
Loading