Skip to content

Sync Upsun skill with latest configuration guidance (a38676782c33)#25

Open
ganeshdipdumbare wants to merge 1 commit intomainfrom
auto/sync-upsun-skill-a38676782c33-3657278
Open

Sync Upsun skill with latest configuration guidance (a38676782c33)#25
ganeshdipdumbare wants to merge 1 commit intomainfrom
auto/sync-upsun-skill-a38676782c33-3657278

Conversation

@ganeshdipdumbare
Copy link
Copy Markdown
Contributor

Automated sync of the Upsun skill with configuration guidance in the internal platformsh/ai repository.

Signature: a38676782c33

Rationale (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):

Output (in upsun/ai) Sourced from (in platformsh/ai)
plugins/upsun/skills/upsun/references/config.md prompts/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.jinja
plugins/upsun/skills/upsun/references/config/directus.md guides/per-result/directus.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/django.md guides/per-result/django.md.jinja, guides/per-group/python.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/drupal.md guides/per-result/drupal.md.jinja, guides/per-group/php.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/echo.md guides/per-result/echo.md.jinja, guides/per-group/go.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/express.md guides/per-result/express.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/flask.md guides/per-result/flask.md.jinja, guides/per-group/python.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/gatsby.md guides/per-result/gatsby.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/gin.md guides/per-result/gin.md.jinja, guides/per-group/go.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/go.md guides/per-group/go.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/hugo.md guides/per-result/hugo.md.jinja, guides/per-group/static.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/jekyll.md guides/per-result/jekyll.md.jinja, guides/per-group/static.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/js.md guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/laravel.md guides/per-result/laravel.md.jinja, guides/per-group/php.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/nextjs.md guides/per-result/nextjs.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/nuxt.md guides/per-result/nuxt.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/php.md guides/per-group/php.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/python.md guides/per-group/python.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/rails.md guides/per-result/rails.md.jinja, guides/per-group/ruby.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/reactjs.md guides/per-result/reactjs.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/ruby.md guides/per-group/ruby.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/sinatra.md guides/per-result/sinatra.md.jinja, guides/per-group/ruby.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/static.md guides/per-group/static.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/strapi.md guides/per-result/strapi.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/sylius.md guides/per-result/sylius.md.jinja, guides/per-group/php.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/symfony.md guides/per-result/symfony.md.jinja, guides/per-group/php.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/vite.md guides/per-result/vite.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/vuejs.md guides/per-result/vuejs.md.jinja, guides/per-group/js.md.jinja, prompts/genconf/text/01-reference.md.jinja
plugins/upsun/skills/upsun/references/config/wordpress.md guides/per-result/wordpress.md.jinja, guides/per-group/php.md.jinja, prompts/genconf/text/01-reference.md.jinja

Source 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.

Copilot AI review requested due to automatic review settings April 23, 2026 10:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +26 to +36
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
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +31
set -ex
npm ci --omit=dev
npm run build
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
# 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
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 *.

Suggested change
cp -Rs $PWD/.next-built/* .next
cp -Rs "$PWD/.next-built/." .next

Copilot uses AI. Check for mistakes.

# 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")'
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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")'

Copilot uses AI. Check for mistakes.
hooks:
build: |
set -ex
go build -o server ./...
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
go build -o server ./...
go build -o server .

Copilot uses AI. Check for mistakes.
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"'
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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"'

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +33
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
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
# 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"
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
echo >> "$settings_dir"/settings.py "\n# Upsun configuration"
printf '\n# Upsun configuration\n' >> "$settings_dir"/settings.py

Copilot uses AI. Check for mistakes.

**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)
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- **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)

Copilot uses AI. Check for mistakes.
index: [index.html]
expires: 5m
rules:
'^\.(css|js|png|jpg|svg|webp)$':
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ^/.*).

Suggested change
'^\.(css|js|png|jpg|svg|webp)$':
'^/.*\.(css|js|png|jpg|svg|webp)$':

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants