-
Notifications
You must be signed in to change notification settings - Fork 302
feat: move application yaml to own topic #2120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| --- | ||
| nav: | ||
| title: Application YAML | ||
| position: 80 | ||
| --- | ||
|
|
||
| # 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: | ||
|
|
||
| ```sh | ||
| sw-paas application update | ||
| ``` | ||
|
|
||
| ## Structure | ||
|
|
||
| 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 | ||
|
|
||
| ```yaml | ||
| app: | ||
| php: | ||
|
Check warning on line 30 in products/paas/shopware/fundamentals/application_yaml.md
|
||
| version: "8.3" | ||
| environment_variables: [] | ||
| services: | ||
| mysql: | ||
| version: "8.0" | ||
| opensearch: | ||
| enabled: false | ||
| ``` | ||
|
|
||
| ## Full example | ||
|
|
||
| ```yaml | ||
| app: | ||
| php: | ||
|
Check warning on line 44 in products/paas/shopware/fundamentals/application_yaml.md
|
||
| 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: true | ||
| ``` | ||
|
|
||
| ## Reference | ||
|
|
||
| ### `app.php.version` | ||
|
|
||
| The PHP version used by the application. | ||
|
|
||
| ```yaml | ||
| app: | ||
| php: | ||
|
Check warning on line 68 in products/paas/shopware/fundamentals/application_yaml.md
|
||
| version: "8.3" | ||
| ``` | ||
|
|
||
| ### `app.environment_variables` | ||
|
|
||
| A list of environment variables 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. | ||
|
|
||
| ```yaml | ||
| app: | ||
| environment_variables: | ||
| - name: MY_VARIABLE | ||
| value: runtime-value | ||
| scope: RUN | ||
| - name: MY_VARIABLE | ||
| value: build-value | ||
| scope: BUILD | ||
| ``` | ||
|
|
||
| For sensitive values, use [secrets](./secrets.md) instead of environment variables. | ||
|
|
||
| For more details, see the [Environment variables](./environment-variables.md) page. | ||
|
|
||
| ### `services.mysql` | ||
|
|
||
| Configures the managed MySQL database. | ||
|
|
||
| ```yaml | ||
| services: | ||
| mysql: | ||
| version: "8.0" | ||
| ``` | ||
|
|
||
| ### `services.opensearch` | ||
|
|
||
| Enables or disables the managed OpenSearch service. | ||
|
|
||
| ```yaml | ||
| services: | ||
| opensearch: | ||
| enabled: true | ||
| ``` | ||
|
|
||
| After enabling OpenSearch, update your application and reindex your data. See [How to set up OpenSearch](../guides/opensearch.md) for the full steps. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,9 +66,7 @@ This package installs essential configuration files, including those required fo | |
|
|
||
| ### Create the `application.yaml` File | ||
|
|
||
| At the root of your project, create a file named `application.yaml`. This file defines key deployment parameters, such as the PHP version and any environment-specific configuration needed for your shop. | ||
|
|
||
| #### Basic Example | ||
| At the root of your project, create a file named `application.yaml`. This file defines key deployment parameters such as the PHP version, environment variables, and services for your shop. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we could add a link to the dedicated section for |
||
|
|
||
| ```yaml | ||
| app: | ||
|
|
@@ -82,22 +80,7 @@ services: | |
| enabled: false | ||
| ``` | ||
|
|
||
| #### Advanced Example (with Custom Environment Variables) | ||
|
|
||
| ```yaml | ||
| app: | ||
| php: | ||
| version: "8.3" | ||
| environment_variables: | ||
| - name: INSTALL_LOCALE | ||
| value: fr-FR | ||
| scope: RUN # Supports RUN or BUILD | ||
| services: | ||
| mysql: | ||
| version: "8.0" | ||
| opensearch: | ||
| enabled: false | ||
| ``` | ||
| For the full configuration reference, see the [Application YAML Configuration](../fundamentals/application_yaml.md) page. | ||
|
|
||
| ## Hooks Configuration | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3