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 1 commit
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
Next Next commit
Improve build and deploy env definitions
  • Loading branch information
Barny committed Mar 29, 2021
commit fbf9704ba8f51e5a7eccd33c21d2db82561dd769
32 changes: 32 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,38 @@ 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

Before Configuration Management:

```
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:

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


{:.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
32 changes: 32 additions & 0 deletions src/cloud/project/magento-env-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,38 @@ The `.magento.env.yaml` file includes the following sections:
- `email`—Configure an email to send to one or more email recipients.
- [logging handlers]({{ site.baseurl }}/cloud/env/log-handlers.html)—Configure hardware and software application messages sent to a remote logging server.

{:.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.
hguthrie marked this conversation as resolved.
Show resolved Hide resolved

### Example

Before Configuration Management:

```
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:

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

The latest sample of the `.magento.env.yaml` file contains a detailed definition for all variables described in the following reference topics:

- [Application]({{ site.baseurl }}/cloud/env/environment-vars_magento.html)—variables control administrative credentials
Expand Down