Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Improve build and deploy env definitions #8843

Merged
merged 3 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/_includes/cloud/scd-configuration-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Before Configuration Management:

```yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
consumers: []
SCD_STRATEGY: compact
SCD_MATRIX:
...
REDIS_USE_SLAVE_CONNECTION: 1
```

After enabling Configuration Management, move the SCD_* variables to the build stage:

```yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
consumers: []
REDIS_USE_SLAVE_CONNECTION: 1
build:
SCD_STRATEGY: compact
SCD_MATRIX:
...
```
6 changes: 6 additions & 0 deletions src/cloud/live/sens-data-over.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ You can also set sensitive values using the Magento CLI command: `bin/magento co

Depending on the size of your store, you may have a large amount of static content files to deploy. Normally, static content deploys during the deploy phase when Magento is in Maintenance mode. The most optimal configuration is to generate static content during the build phase. See [Choosing a deploy strategy][scd].

If you have enabled Configuration Management after dumping the configurations, you should move the SCD_* variables (in `.magento.env.yaml`) from the deploy to the build stage to properly enable static content generation in the build phase.

### Example

{% include cloud/scd-configuration-management.md %}

{:.bs-callout-info}
Before deploying static files, the build and deploy phases compress static content using GZIP. Compressing static files reduces server loads and increases site performance. Refer to [Magento build options]({{ site.baseurl }}/cloud/env/variables-build.html) to learn about customizing or disabling file compression.

Expand Down
9 changes: 8 additions & 1 deletion src/cloud/project/magento-env-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,11 @@ Environment configuration is not valid. Correct the following items in your .mag
The SCD_THREADS variable contains an invalid value of type string. Use the following type: integer.
The SCD_STRATEGY variable contains an invalid value fast. Use one of the available value options: compact, quick, standard.
The NOT_EXIST_OPTION variable is not allowed in configuration.
```
```

## Configuration management optimization

{:.bs-callout-info}
If you have enabled Configuration Management after dumping the configurations, you should move the SCD_* variables from the deploy to the build stage.

{% include cloud/scd-configuration-management.md %}