You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
For Pro projects, the changes you make using this YAML file affects your Integration environment only. To make these changes in a Staging or Production environment, you must create a [Support ticket](http://support.magento.com){:target="_blank"}.
Copy file name to clipboardExpand all lines: guides/v2.1/cloud/project/project-conf-files_magento-app.md
+63-62Lines changed: 63 additions & 62 deletions
Original file line number
Diff line number
Diff line change
@@ -22,40 +22,39 @@ The `.magento.app.yaml` has many default values, see [a sample `.magento.app.yam
22
22
Use the following properties to build your application configuration file. The `name`, `type`, `disk`, and one `web` or `worker` block is required.
23
23
24
24
### `name`
25
-
{{site.data.var.ee}} supports multiple applications in a project, so you need a unique name that identifies the application in the project.
25
+
{{site.data.var.ee}} supports multiple applications in a project, so you need a unique name that identifies the application in the project. You must use lower case alphanumeric characters, such as `a` to `z` and `0` to `9` for the name.
26
26
27
-
The `name` property can consist only of lower case alphanumeric characters, such as `a` to `z` and `0` to `9`. The name is used in the [`routes.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_routes.html) file to define the HTTP upstream (by default, `php:http`). For example, if the value of `name` is `app`, you must use `app:http` in the upstream field. You can also use this name in multi-application relationships.
27
+
The name is used in the [`routes.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_routes.html) file to define the HTTP upstream (by default, `php:http`). For example, if the value of `name` is `app`, you must use `app:http` in the upstream field. You can also use this name in multi-application relationships.
28
28
29
29
{% include note.html type="info" content="Do not change the name of an application after it has been deployed." %}
30
30
31
31
### `type` and `build`
32
-
The `type` and `build` properties are used to build and run the project. The only supported `type` currently is {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %}.
32
+
The `type` and `build` properties provide information about the base container image to build and run the project.
33
33
34
-
Supported versions for 2.0.X to 2.1.X:
34
+
The supported `type` language is {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %}. Specify the PHP version as follows:
35
35
36
-
```
37
-
type: php:5.5
38
-
type: php:5.6
36
+
```yaml
39
37
type: php:7.0
40
38
```
41
39
42
-
The `build` property determines what happens by default when building the project. The only value currently supported is `composer`.
40
+
The `build` property determines what happens by default when building the project. The `flavor` specifies a default set of build tasks to run. The supported flavor is `composer`.
43
41
44
42
```yaml
45
-
type: php:7.0
46
43
build:
47
44
flavor: composer
48
45
```
49
46
50
47
### `access`
51
-
Defines the user roles who can log in using SSH to the environments to which they have access.
48
+
The _access_ property indicates a minimum user role level that is allowed SSH access to the environments. The available user roles are:
52
49
53
-
Possible values are:
50
+
- `admin`—Can change settings and execute actions in the environment. Also has _contributor_ and _viewer_ rights.
51
+
- `contributor`—Can push code to this environment and branch from the environment. Also has _viewer_ rights.
52
+
- `viewer`—Can view the environment only.
54
53
55
-
```
56
-
ssh: admin
54
+
The default user role is as follows:
55
+
56
+
```yaml
57
57
ssh: contributor
58
-
ssh: viewer
59
58
```
60
59
61
60
### `relationships`
@@ -84,7 +83,7 @@ Supports the following:
84
83
* `index_files`: To use a static file (for example, `index.html`) to serve your application. This key expects a collection. For this to work, the static file(s) should be included in your whitelist. For example, to use a file named `index.html` as an index file, your whitelist should include an element that matches the filename, like `- \.html$`.
85
84
* `blacklist`: A list of files that should never be executed. Has no effect on static files.
86
85
* `whitelist`: A list of static files (as regular expressions) that can be served. Dynamic files (for example, PHP files) are treated as static files and have their source code served, but they are not executed.
87
-
* `expires`: The number of seconds whitelisted (that is, static) content should be cached by the browser. This enables the cache-control and expires headers for static content. The `expires` directive and resulting headers are left out entirely if this isn't set.
86
+
* `expires`: The number of seconds whitelisted (that is, static) content should be cached by the browser. This enables the cache-control and expires headers for static content. The `expires` directive and resulting headers are left out entirely if this is not set.
88
87
89
88
Contrary to standard `.htaccess` approaches, which accept a *blacklist* and allow everything to be accessed except a specific list, we accept a *whitelist*, which means that anything not matched will trigger a 404 error and will be passed through to your `passthru` URL.
90
89
@@ -98,46 +97,48 @@ The following displays the default set of web accessible locations associated wi
98
97
```yaml
99
98
# The configuration of app when it is exposed to the web.
100
99
web:
101
-
locations:
102
-
"/":
103
-
# The public directory of the app, relative to its root.
104
-
root: "pub"
105
-
# The front-controller script to send non-static requests to.
Defines the size of the persistent disk size of the application in MB.
132
+
Defines the persistent disk size of the application in MB.
133
+
134
+
```yaml
135
+
disk: 256
136
+
```
134
137
135
138
{% include note.html type="info" content="The minimal recommended disk size is 256MB. If you see the error `UserError: Error building the project: Disk size may not be smaller than 128MB`, increase the size to 256MB." %}
136
139
137
140
### `mounts`
138
-
An object whose keys are paths relative to the root of the application. The mount is a writable area on the disk for files. It's in the form `volume_id[/subpath]`.
139
-
140
-
The following is a default list of mounts configured in `magento.app.yaml`:
141
+
An object whose keys are paths relative to the root of the application. The mount is a writable area on the disk for files. The following is a default list of mounts configured in the `magento.app.yaml` file using the `volume_id[/subpath]` syntax:
141
142
142
143
```yaml
143
144
# The mounts that will be performed when the package is deployed.
@@ -154,12 +155,12 @@ The format for adding your mount to this list is as follows:
* `shared` means that the volume is shared between your applications inside an environment.
158
-
* `disk` key defines the size available for that `shared` volume
158
+
- `shared`—Shares a volume between your applications inside an environment.
159
+
- `disk`—Defines the size available for the shared volume.
159
160
160
161
{% include note.html type="info" content="The subpath portion of the mount is the unique identifier of the files area. If changed, files at the old location will be permanently lost. Do not change this value once your site has data unless you really want to lose all existing data."%}
161
162
162
-
If you also want the mount web accessible, you must add it to the [`web`](#web) block of locations.
163
+
Also, if you want the mount web accessible, you must add it to the [`web`](#web) block of locations.
163
164
164
165
### `dependencies`
165
166
Enables you to specify dependencies that your application might need during the build process.
@@ -210,24 +211,24 @@ The commands run from the application (`/app`) directory. You can use the `cd` c
210
211
211
212
```yaml
212
213
dependencies:
213
-
ruby:
214
-
sass: "3.4.7"
215
-
nodejs:
216
-
grunt-cli: "~0.1.13"
214
+
ruby:
215
+
sass: "3.4.7"
216
+
nodejs:
217
+
grunt-cli: "~0.1.13"
217
218
218
219
hooks:
219
-
build: |
220
-
cd public/profiles/project_name/themes/custom/theme_name
221
-
npm install
222
-
grunt
223
-
cd
224
-
php ./bin/magento magento-cloud:build
220
+
build: |
221
+
cd public/profiles/project_name/themes/custom/theme_name
222
+
npm install
223
+
grunt
224
+
cd
225
+
php ./bin/magento magento-cloud:build
225
226
```
226
227
227
228
You must compile SASS files using `grunt` before static content deployment, which happens during the build. Place the `grunt` command before the `build` command.
228
229
229
230
### `crons`
230
-
`crons`describes processes that are triggered on a schedule. We recommend you run cron as the [Magento file system owner]({{ page.baseurl }}/cloud/before/before-workspace-file-sys-owner.html). Do not run cron as `root`. We also recommend against running cron as the web server user.
231
+
Describes processes that are triggered on a schedule. We recommend you run cron as the [Magento file system owner]({{ page.baseurl }}/cloud/before/before-workspace-file-sys-owner.html). Do _not_ run cron as `root`or as the web server user.
Copy file name to clipboardExpand all lines: guides/v2.1/cloud/project/project-conf-files_routes.md
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,9 @@ functional_areas:
8
8
- Setup
9
9
---
10
10
11
-
{{site.data.var.ee}} processes an incoming {% glossarytooltip a05c59d3-77b9-47d0-92a1-2cbffe3f8622 %}URL{% endglossarytooltip %} using a *route*. The `routes.yaml` file—located at `.magento/routes.yaml` in your project—defines routes for Integration, Staging, and Production environments.
11
+
{{site.data.var.ee}} processes an incoming URLusing a *route*. The `routes.yaml` file—located at `.magento/routes.yaml` in your project—defines routes for the Integration environment. The deploy script uses values defined in the configuration files in the `.magento` directory and deletes the directory after deployment. Your local workspace is not affected.
12
12
13
-
The deploy script uses values defined in the configuration files in the `.magento` directory. The script deletes the directory after deployment. Your local workspace is not affected.
14
-
15
-
{% include cloud/note-pro-using-yaml.md %}
13
+
{% include cloud/note-pro-using-yaml-support.md %}
16
14
17
15
The following is the default `routes.yaml` file:
18
16
@@ -26,7 +24,7 @@ If you do not create a custom `routes.yaml` file, the automated deployment uses
Copy file name to clipboardExpand all lines: guides/v2.1/cloud/project/project-conf-files_services.md
+14-22Lines changed: 14 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,11 @@ functional_areas:
8
8
- Setup
9
9
---
10
10
11
-
We provide a `services.yaml` file to configure all of your services supported and used by {{site.data.var.ece}}. These services include MySQL, PHP, Redis, ElasticSearch (for 2.1.X and later), and so on. You don't need to subscribe to external service providers.
11
+
Use the `services.yaml` file to configure all of your services supported and used by {{site.data.var.ece}}. These services include MySQL, Redis, ElasticSearch (for 2.1.X and later), and so on. You do not need to subscribe to external service providers.This file is located in the `.magento` directory in your project. See the latest sample of the [`services.yaml`](https://github.com/magento/magento-cloud/blob/master/.magento/services.yaml){:target="_blank"} file.
12
12
13
-
This file is located at `.magento/services.yaml` in your project.
13
+
When you push your Git branch, our deploy script uses the values defined by configuration files in the `.magento` directory. After deployment, the script deletes the directory and its contents. Your local development environment is not affected.
14
14
15
-
<divclass="bs-callout bs-callout-info"id="info">
16
-
<p>When you push your Git branch, our deploy script uses the values defined by configuration files in the <code>.magento</code> directory. After deployment, the script deletes the directory and its contents. Your local development environment isn't affected.</p>
17
-
</div>
18
-
19
-
To see an example, see this [sample `services.yaml` file](https://github.com/magento/magento-cloud/blob/master/.magento/services.yaml){:target="_blank"}.
20
-
21
-
**For Pro:**
22
-
23
-
{% include cloud/note-pro-using-yaml.md %}
24
-
25
-
The following sections discuss properties in `services.yaml`.
15
+
{% include cloud/note-pro-using-yaml-support.md %}
26
16
27
17
## How this file works {#howitworks}
28
18
The `.magento.app.yaml` and `services.yaml` files set the services, applications, and configurations to build and include in an environment. If you add services with specific versions, the initial push and deployment of your branches with these updated files directs the PaaS environment to provision the environment with those services. When you make changes to the services, the environment updates.
@@ -35,18 +25,20 @@ This affects the following environments:
35
25
To install and update services in Pro Staging and Production environments (IaaS), you must enter a [Support ticket]({{ page.baseurl }}/cloud/trouble/trouble.html). Indicate the service changes needed and your updated `.magento.app.yaml` and `services.yaml` files in the ticket.
Your Git branch includes the following default `services.yaml` file:
28
+
The following is the default `services.yaml` file:
39
29
40
-
mysql:
41
-
type: mysql:10.0
42
-
disk: 2048
30
+
```yaml
31
+
mysql:
32
+
type: mysql:10.0
33
+
disk: 2048
43
34
44
-
redis:
45
-
type: redis:3.0
35
+
redis:
36
+
type: redis:3.0
46
37
47
-
solr:
48
-
type: solr:4.10
49
-
disk: 1024
38
+
solr:
39
+
type: solr:4.10
40
+
disk: 1024
41
+
```
50
42
51
43
Modify this file to use specific and additional services in your deployment. See the [`type`](#cloud-yaml-services-type) section to see the services we support and deploy for you if you add them to the file.
0 commit comments