services.yaml file to configure all of your services supported and used by Magento Commerce Cloud. 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
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.
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.
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
A Cloud template includes the following default
1 2 3 4 5 6 7 8 9 10 mysql: type: mysql:10.0 disk: 2048 redis: type: redis:3.0 elasticsearch: type: elasticsearch:6.5 disk: 1024
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:
1 2 3 name: type: name:version disk: value
1 2 3 mysql: type: mysql:10.0 disk: 2048
Identifies the service in the project. The
name can consist only of lower case alphanumeric characters:
9. For example, Redis is entered as
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.
1 2 3 4 5 redis: type: redis:3.0 redis2: type: redis:3.0
Be aware, if you rename a service in the
services.yaml file, 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:
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 the