We provide a
services.yaml file to configure all of your services supported and used by Magento Commerce (Cloud). 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.
This file is located at
.magento/services.yaml in your project.
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 isn't affected.
To see an example, see this sample
For Pro projects **created before October 23, 2017**, 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 Add Staging and Production to Pro projects UI.
The following sections discuss properties in
How this file works
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.
This affects the following environments:
- All Starter environments including Production
- Pro Integration environments
To install and update services in Pro Staging and Production environments (IaaS), you must enter a Support ticket. Indicate the service changes needed and your updated
services.yaml files in the ticket.
Default and supported services
Your Git branch includes the following default
mysql: type: mysql:10.0 disk: 2048 redis: type: redis:3.0
Modify this file to use specific and additional services in your deployment. See the
type section to see the services we support and deploy for you if you add them to the file.
To add a service, you add the following data to services.yaml:
name: type: name:version disk: value
mysql: type: mysql:10.0 disk: 2048
name identifies the service in the project. The
name can consist only of lower case alphanumeric characters:
9. For example, Redis is entered as redis.
You can have multiple instances of each service type. For example, you could have multiple Redis instances. For example, we use multiple Redis instances, one for session and one for cache.
redis: type: redis:3.0
redis2: type: redis:3.0
Be aware, if you rename a service in
services.yaml, the following is permanently removed:
- The existing service before creating a new service with the new name you specify.
- All existing data for the service is removed. We strongly recommend you snapshot your environment before you change the name of an existing service.
type of your service in the format
We support and deploy the following services for you:
disk specifies the size of the persistent disk storage (in MB) allocated to the service.
For example, the current default storage amount per project is 5GB, or 5120MB. You can distribute this amount between your application and each of its services.
Using the services
For services to be available to an application in your project, you must specify relationships between applications and services in