Sync Upsun skill with latest configuration guidance (a38676782c33)#25
Sync Upsun skill with latest configuration guidance (a38676782c33)#25ganeshdipdumbare wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Automated sync of the Upsun skill’s configuration reference docs to match the latest internal configuration guidance, including standardized relationship idioms, registry/version verification reminders, and per-framework examples.
Changes:
- Adds/updates the top-level config reference with expanded guidance on
.environment, relationships, composable images, and a per-framework index. - Introduces/refreshes per-language and per-framework configuration reference pages (PHP, Python, Ruby, Node.js, and many frameworks).
- Aligns examples with the provided registry snapshot and adds “verify against canonical registry” reminders throughout.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/upsun/skills/upsun/references/config.md | Updates core config guidance (relationships shorthand, composable images, registry section, cross-links). |
| plugins/upsun/skills/upsun/references/config/directus.md | Adds Directus-specific Node/DB/Redis reference config and deployment flow. |
| plugins/upsun/skills/upsun/references/config/django.md | Adds Django+uv reference config with build-time auto-detection and static/media handling. |
| plugins/upsun/skills/upsun/references/config/drupal.md | Adds Drupal reference config with Drush, settings.upsun.php bootstrap, Redis and route cache. |
| plugins/upsun/skills/upsun/references/config/echo.md | Adds minimal Go (Echo) reference config plus database/service guidance. |
| plugins/upsun/skills/upsun/references/config/express.md | Adds Express reference config extending Node.js guidance. |
| plugins/upsun/skills/upsun/references/config/flask.md | Adds Flask+uv reference config using gunicorn and database relationship. |
| plugins/upsun/skills/upsun/references/config/gatsby.md | Adds Gatsby reference config and cache mount guidance. |
| plugins/upsun/skills/upsun/references/config/gin.md | Adds Gin reference config plus DB/worker patterns and optional caching rules snippet. |
| plugins/upsun/skills/upsun/references/config/go.md | Adds general Go reference config and database/worker patterns. |
| plugins/upsun/skills/upsun/references/config/hugo.md | Adds Hugo static-site guidance for composable image and pinned binary install. |
| plugins/upsun/skills/upsun/references/config/jekyll.md | Adds Jekyll static-site guidance on Ruby image usage and static serving. |
| plugins/upsun/skills/upsun/references/config/js.md | Adds general Node.js reference config and package manager notes. |
| plugins/upsun/skills/upsun/references/config/laravel.md | Adds Laravel reference config with composer build and runtime env derivation. |
| plugins/upsun/skills/upsun/references/config/nextjs.md | Adds Next.js reference config including writable .next handling and deploy/start sync. |
| plugins/upsun/skills/upsun/references/config/nuxt.md | Adds Nuxt reference config including writable .nuxt handling and deploy/start sync. |
| plugins/upsun/skills/upsun/references/config/php.md | Adds general PHP build/runtime/web configuration guidance. |
| plugins/upsun/skills/upsun/references/config/python.md | Adds Python reference configs across uv/Poetry/Pipenv/pip patterns. |
| plugins/upsun/skills/upsun/references/config/rails.md | Adds Rails reference config including DB URL guidance and optional worker notes. |
| plugins/upsun/skills/upsun/references/config/reactjs.md | Adds React reference configs (CRA/Vite) and package manager notes. |
| plugins/upsun/skills/upsun/references/config/ruby.md | Adds general Ruby patterns for runtime selection, DB URL, workers, mounts. |
| plugins/upsun/skills/upsun/references/config/sinatra.md | Adds Sinatra reference config and DB option notes. |
| plugins/upsun/skills/upsun/references/config/static.md | Adds generic static-site guidance with composable and standard runtime options. |
| plugins/upsun/skills/upsun/references/config/strapi.md | Adds Strapi reference config and DB/service notes. |
| plugins/upsun/skills/upsun/references/config/sylius.md | Adds Sylius reference config with Symfony/Yarn build, mounts, crons, DB. |
| plugins/upsun/skills/upsun/references/config/symfony.md | Adds Symfony reference config including Symfony CLI configurator and DB options. |
| plugins/upsun/skills/upsun/references/config/vite.md | Adds Vite static-site reference config and caching/security notes. |
| plugins/upsun/skills/upsun/references/config/vuejs.md | Adds Vue+Vite static SPA reference config plus package manager notes. |
| plugins/upsun/skills/upsun/references/config/wordpress.md | Adds WordPress reference config with Bedrock/standard notes, mounts, crons, caching. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cat > .environment <<EOF | ||
| CACHE_ENABLED=true | ||
| CACHE_STORE=redis | ||
| REDIS_HOST=$REDIS_HOST | ||
| REDIS_PORT=$REDIS_PORT | ||
| RATE_LIMITER_ENABLED=true | ||
| RATE_LIMITER_STORE=redis | ||
| RATE_LIMITER_REDIS_HOST=$REDIS_HOST | ||
| RATE_LIMITER_REDIS_PORT=$REDIS_PORT | ||
| KEY=$PLATFORM_PROJECT_ENTROPY | ||
| SECRET=$PLATFORM_PROJECT_ENTROPY |
There was a problem hiding this comment.
The build hook writes .environment using an unquoted heredoc, so $REDIS_HOST/$REDIS_PORT are expanded at build time. Per references/config.md, build hooks have no access to services, so these values will be empty. Use a quoted heredoc (to defer expansion until runtime) or write the file in deploy, and ensure entries are export statements since .environment is sourced as a shell script.
| cat > .environment <<EOF | |
| CACHE_ENABLED=true | |
| CACHE_STORE=redis | |
| REDIS_HOST=$REDIS_HOST | |
| REDIS_PORT=$REDIS_PORT | |
| RATE_LIMITER_ENABLED=true | |
| RATE_LIMITER_STORE=redis | |
| RATE_LIMITER_REDIS_HOST=$REDIS_HOST | |
| RATE_LIMITER_REDIS_PORT=$REDIS_PORT | |
| KEY=$PLATFORM_PROJECT_ENTROPY | |
| SECRET=$PLATFORM_PROJECT_ENTROPY | |
| cat > .environment <<'EOF' | |
| export CACHE_ENABLED=true | |
| export CACHE_STORE=redis | |
| export REDIS_HOST=$REDIS_HOST | |
| export REDIS_PORT=$REDIS_PORT | |
| export RATE_LIMITER_ENABLED=true | |
| export RATE_LIMITER_STORE=redis | |
| export RATE_LIMITER_REDIS_HOST=$REDIS_HOST | |
| export RATE_LIMITER_REDIS_PORT=$REDIS_PORT | |
| export KEY=$PLATFORM_PROJECT_ENTROPY | |
| export SECRET=$PLATFORM_PROJECT_ENTROPY |
| set -ex | ||
| npm ci --omit=dev | ||
| npm run build |
There was a problem hiding this comment.
npm ci --omit=dev will omit devDependencies, but Vite is typically a devDependency and is required for npm run build in Vite projects. This example is likely to fail; use npm ci (or install dev deps during build) for the build step.
| # Symlink build artifacts (.next-built) into the existing mount (.next) during deployment. | ||
| touch .next/build-tree-id | ||
| if [ "$(< .next/build-tree-id)" != "$PLATFORM_TREE_ID" ]; then | ||
| cp -Rs $PWD/.next-built/* .next |
There was a problem hiding this comment.
cp -Rs $PWD/.next-built/* .next won’t include dotfiles (because * doesn’t match them). Next.js build output may include dotfiles, so this can produce incomplete runtime state. Use a copy/symlink approach that includes dotfiles (or copy the directory itself) rather than globbing *.
| cp -Rs $PWD/.next-built/* .next | |
| cp -Rs "$PWD/.next-built/." .next |
|
|
||
| # Set up environment variables for use at runtime. | ||
| echo >> .environment 'export DATABASE_URL="${DB_SCHEME}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_PATH}"' | ||
| echo >> .environment 'export WP_HOME=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r "to_entries[] | select(.value.primary == true) | .key")' |
There was a problem hiding this comment.
In the .environment line that derives WP_HOME, $PLATFORM_ROUTES is unquoted inside echo. If the decoded value contains whitespace/newlines, word-splitting can break the pipeline. Quote it (e.g., echo "$PLATFORM_ROUTES" | ...) in the generated .environment snippet.
| echo >> .environment 'export WP_HOME=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r "to_entries[] | select(.value.primary == true) | .key")' | |
| echo >> .environment 'export WP_HOME=$(echo "$PLATFORM_ROUTES" | base64 --decode | jq -r "to_entries[] | select(.value.primary == true) | .key")' |
| hooks: | ||
| build: | | ||
| set -ex | ||
| go build -o server ./... |
There was a problem hiding this comment.
go build -o server ./... is invalid because ./... expands to multiple packages; -o can only be used when building a single main package. Use a specific main package path (e.g. ./cmd/server or .) or omit -o and build a single target.
| go build -o server ./... | |
| go build -o server . |
| bundle exec rails assets:precompile | ||
|
|
||
| # Database URL configuration for Rails auto-discovery | ||
| echo >> .environment 'export DATABASE_URL="mysql://$DB_USERNAME:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_PATH"' |
There was a problem hiding this comment.
The example sets DATABASE_URL to mysql://... but later in the same document you note Rails (pre-8) expects mysql2://.... Using mysql:// here is inconsistent and can select the wrong adapter. Prefer mysql2:// when using the mysql2 gem (the common case).
| echo >> .environment 'export DATABASE_URL="mysql://$DB_USERNAME:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_PATH"' | |
| echo >> .environment 'export DATABASE_URL="mysql2://$DB_USERNAME:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_PATH"' |
| cat > .environment << EOF | ||
| NODE_ENV=production | ||
| DATABASE_CLIENT=postgres | ||
| APP_KEYS=$PLATFORM_PROJECT_ENTROPY | ||
| API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | ||
| ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY | ||
| TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | ||
| JWT_SECRET=$PLATFORM_PROJECT_ENTROPY |
There was a problem hiding this comment.
The .environment file is created via an unquoted heredoc with plain KEY=value lines. Since .environment is documented as a shell script (see references/config.md), prefer export KEY=... lines, and consider quoting the heredoc delimiter if you intend any variables to be resolved at runtime rather than at build time.
| cat > .environment << EOF | |
| NODE_ENV=production | |
| DATABASE_CLIENT=postgres | |
| APP_KEYS=$PLATFORM_PROJECT_ENTROPY | |
| API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | |
| ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY | |
| TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | |
| JWT_SECRET=$PLATFORM_PROJECT_ENTROPY | |
| cat > .environment << 'EOF' | |
| export NODE_ENV=production | |
| export DATABASE_CLIENT=postgres | |
| export APP_KEYS=$PLATFORM_PROJECT_ENTROPY | |
| export API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | |
| export ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY | |
| export TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY | |
| export JWT_SECRET=$PLATFORM_PROJECT_ENTROPY |
| # Configure Django settings for Upsun | ||
| export settings_dir=$(basename "$(dirname "$(find . -maxdepth 4 -path './.*' -prune -o -name settings.py -print | head -n1)")") | ||
| if [ -n "$settings_dir" ]; then | ||
| echo >> "$settings_dir"/settings.py "\n# Upsun configuration" |
There was a problem hiding this comment.
echo "\n# Upsun configuration" will write a literal \n into settings.py (echo does not interpret escapes by default). Use printf (or a separate echo for a blank line) to ensure a real newline is appended.
| echo >> "$settings_dir"/settings.py "\n# Upsun configuration" | |
| printf '\n# Upsun configuration\n' >> "$settings_dir"/settings.py |
|
|
||
| **Available Managers**: | ||
| - **npm**: Pre-installed on all Node.js images | ||
| - **bun** and **npx**: Available on Node.js 20+ (note: Node.js 20 is deprecated in the registry snapshot) |
There was a problem hiding this comment.
npx ships with npm and is not tied to a specific Node.js major version. Stating it’s “available on Node.js 20+” is misleading; either list it under npm tooling generally or clarify it’s present whenever npm is present on the image.
| - **bun** and **npx**: Available on Node.js 20+ (note: Node.js 20 is deprecated in the registry snapshot) | |
| - **npx**: Available whenever `npm` is present | |
| - **bun**: Available on Node.js 20+ (note: Node.js 20 is deprecated in the registry snapshot) |
| index: [index.html] | ||
| expires: 5m | ||
| rules: | ||
| '^\.(css|js|png|jpg|svg|webp)$': |
There was a problem hiding this comment.
This rule regex (^\.(css|js|...)$) won’t match typical URL paths (which start with / and include a filename, e.g. /app.css). Use a pattern that matches the end of the path (e.g. \.(css|js|...)$, optionally anchored with ^/.*).
| '^\.(css|js|png|jpg|svg|webp)$': | |
| '^/.*\.(css|js|png|jpg|svg|webp)$': |
Automated sync of the Upsun skill with configuration guidance in the internal
platformsh/airepository.Signature:
a38676782c33Rationale (from the generator): 28 reference file(s) generated/updated (0 NO_UPDATES/errors); core: Align examples with the provided registry snapshot, use consistent relationship idiom, and add per-framework cross-links and registry verification guidance.
Provenance — each output is regenerated from the listed source(s):
plugins/upsun/skills/upsun/references/config.mdprompts/genconf/text/00-instructions.md.jinja,prompts/genconf/text/01-reference.md.jinja,prompts/genconf/text/02-composable-image.md.jinja,prompts/genconf/text/03-registry.md.jinja,prompts/genconf/text/04-source-info.md.jinja,prompts/genconf/text/06-retrieved.md.jinja,prompts/genconf/text/correction.md.jinjaplugins/upsun/skills/upsun/references/config/directus.mdguides/per-result/directus.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/django.mdguides/per-result/django.md.jinja,guides/per-group/python.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/drupal.mdguides/per-result/drupal.md.jinja,guides/per-group/php.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/echo.mdguides/per-result/echo.md.jinja,guides/per-group/go.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/express.mdguides/per-result/express.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/flask.mdguides/per-result/flask.md.jinja,guides/per-group/python.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/gatsby.mdguides/per-result/gatsby.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/gin.mdguides/per-result/gin.md.jinja,guides/per-group/go.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/go.mdguides/per-group/go.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/hugo.mdguides/per-result/hugo.md.jinja,guides/per-group/static.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/jekyll.mdguides/per-result/jekyll.md.jinja,guides/per-group/static.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/js.mdguides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/laravel.mdguides/per-result/laravel.md.jinja,guides/per-group/php.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/nextjs.mdguides/per-result/nextjs.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/nuxt.mdguides/per-result/nuxt.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/php.mdguides/per-group/php.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/python.mdguides/per-group/python.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/rails.mdguides/per-result/rails.md.jinja,guides/per-group/ruby.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/reactjs.mdguides/per-result/reactjs.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/ruby.mdguides/per-group/ruby.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/sinatra.mdguides/per-result/sinatra.md.jinja,guides/per-group/ruby.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/static.mdguides/per-group/static.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/strapi.mdguides/per-result/strapi.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/sylius.mdguides/per-result/sylius.md.jinja,guides/per-group/php.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/symfony.mdguides/per-result/symfony.md.jinja,guides/per-group/php.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/vite.mdguides/per-result/vite.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/vuejs.mdguides/per-result/vuejs.md.jinja,guides/per-group/js.md.jinja,prompts/genconf/text/01-reference.md.jinjaplugins/upsun/skills/upsun/references/config/wordpress.mdguides/per-result/wordpress.md.jinja,guides/per-group/php.md.jinja,prompts/genconf/text/01-reference.md.jinjaSource locations in
platformsh/ai:prompts/genconf/text/*.md.jinja— cross-cutting templates (feed references/config.md).guides/per-group/<lang>.md.jinja— per-language references.guides/per-result/<framework>.md.jinja— per-framework references.This PR was opened automatically. Please review for voice and accuracy before merging — the generator may occasionally over-reach. If the changes aren't wanted, close the PR; a subsequent run will open a FRESH PR on a new branch (the closed PR stays closed). A new PR will also be opened automatically when the source guidance changes or when upstream drifts.