Skip to content

Conversation

@barw4
Copy link
Collaborator

@barw4 barw4 commented Oct 17, 2025

🎫 Issue IBX-10763

Description:

Ibexa Cloud Upsun Setup

This document explains how the ibexa:cloud:setup console command installs the Upsun configuration that ships with this package.

Command Overview

The setup command lives in src/lib/Command/IbexaSetupCommand.php and is exposed as ibexa:cloud:setup. Run it from your Ibexa project root via the Symfony console:

php bin/console ibexa:cloud:setup --upsun

Passing --upsun tells the command to copy the predefined Upsun configuration into your project. When the option is omitted the command exits immediately with a warning, leaving your filesystem untouched.

How Product Detection Works

IbexaProductVersion::getInstalledProduct() inspects the installed Composer packages to determine which Ibexa product edition you have. It matches the first package in the ordered list below, giving higher-tier products priority:

  • ibexa/commerce
  • ibexa/experience
  • ibexa/headless
  • ibexa/oss

The command then uses that product name to decide which resource directories it should read from.

File Copy Strategy

All Upsun templates are stored in resources/upsun. The structure is split between common assets and product-specific assets organised by version:

  • resources/upsun/common/<version> – Files shared by every product.
  • resources/upsun/ibexa-oss/<version> – Assets specific to Ibexa OSS.
  • resources/upsun/ibexa-headless/<version> – Assets specific to Ibexa Headless (plus everything from OSS).
  • resources/upsun/ibexa-experience/<version> – Assets specific to Ibexa Experience (plus Headless and OSS).
  • resources/upsun/ibexa-commerce/<version> – Assets specific to Ibexa Commerce (plus the Experience stack).

When the command runs it:

  1. Resolves the version subdirectory that best matches the currently installed product version (supports aliases like dev-master or 3.3).
  2. Copies every file under the matching common/<version> directory into the project, overwriting existing files when necessary and logging the action.
  3. Walks through the product directories starting from the detected edition and cascading down through lower editions (for example, Commerce → Experience → Headless → OSS). Only the first occurrence of any relative path is used, so higher-tier templates take precedence.
  4. Overwrites existing files in your repository when a template exists; the command will log a notice so you can review changes.

At the time of writing the default template set contains:

  • resources/upsun/common/5.0/.nvmrc
  • resources/upsun/ibexa-headless/5.0/.platform.app.yaml
  • resources/upsun/ibexa-oss/5.0/.platform.app.yaml

Additional product directories (for example ibexa-experience or ibexa-commerce) will be processed automatically as soon as matching templates appear in the tree.

For QA:

Documentation:

@barw4 barw4 changed the title IBX-10763: Added configuration templates IBX-10763: Added configuration templates and setup command Oct 20, 2025
@barw4 barw4 marked this pull request as ready for review October 20, 2025 19:17
@barw4 barw4 self-assigned this Oct 21, 2025
@barw4 barw4 added Feature New feature request Ready for review labels Oct 21, 2025
@barw4 barw4 added the Doc needed The changes require some documentation label Oct 28, 2025
@barw4 barw4 merged commit 38eddff into main Oct 29, 2025
6 checks passed
@mnocon mnocon removed the Doc needed The changes require some documentation label Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature request Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants