Application YAML Configuration
The application.yaml file is the central configuration file for your Shopware PaaS Native application. It is placed at the root of your project repository and defines the PHP version, environment variables, and services for your application.
When you update the application.yaml and push the changes to your repository, apply them by running:
sw-paas application updateStructure
The file consists of two main sections:
| Section | Description |
|---|---|
app | Application settings such as PHP version and environment variables |
services | Infrastructure services like MySQL and OpenSearch |
Minimal example
app:
php:
version: "8.3"
environment_variables: []
services:
mysql:
version: "8.0"
opensearch:
enabled: falseFull example
app:
php:
version: "8.3"
environment_variables:
- name: INSTALL_LOCALE
value: fr-FR
scope: RUN
- name: MY_BUILDTIME_VARIABLE
value: bar
scope: BUILD
services:
mysql:
version: "8.0"
opensearch:
enabled: trueReference
app.php.version
The PHP version used by the application.
app:
php:
version: "8.3"app.environment_variables
A list of environment variables is passed to the application. Each entry requires:
| Field | Description | Values |
|---|---|---|
name | The variable name | Any string |
scope | When the variable is available | RUN, BUILD |
value | The variable value | Any string |
RUN-- available at runtime (passed to the Shopware application).BUILD-- available during the build step.
You can define the same variable name with different scopes to use different values at build-time and runtime.
app:
environment_variables:
- name: MY_VARIABLE
value: runtime-value
scope: RUN
- name: MY_VARIABLE
value: build-value
scope: BUILDFor sensitive values, use secrets instead of environment variables.
For more details, see the Environment variables page.
services.mysql
Configures the managed MySQL database.
services:
mysql:
version: "8.0"services.opensearch
Enables or disables the managed OpenSearch service.
services:
opensearch:
enabled: trueAfter enabling OpenSearch, update your application and reindex your data. See How to set up OpenSearch for the full steps.