diff --git a/plugins/upsun/skills/upsun/SKILL.md b/plugins/upsun/skills/upsun/SKILL.md index ddf5fd3..936abb8 100644 --- a/plugins/upsun/skills/upsun/SKILL.md +++ b/plugins/upsun/skills/upsun/SKILL.md @@ -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. @@ -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. diff --git a/plugins/upsun/skills/upsun/references/config.md b/plugins/upsun/skills/upsun/references/config.md index 387ebbd..59e9dea 100644 --- a/plugins/upsun/skills/upsun/references/config.md +++ b/plugins/upsun/skills/upsun/references/config.md @@ -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.