In the previous step, you created a collection of empty configuration files that will allow the project to be deployed on Platform.sh.
Now you will need to include information that will tell Platform.sh how you want your application to connect to its services in a
With the following project structure:
. ├── .platform │ ├── routes.yaml │ └── services.yaml ├── .platform.app.yaml └── < application code >
.platform/services.yaml will look something like this:
# The services of the project. # # Each service listed will be deployed # to power your Platform.sh project. db: type: mariadb:10.4 disk: 2048 cache: type: redis:6.0
If your application does not use any services at this point then you can leave it blank, but it must exist in your repository to run on Platform.sh. If your application does use a database or other services, you can configure them with the following attributes:
name: Provide a name for the service, so long as it is alphanumeric. If your application requires multiple services of the same type, make sure to give them different names so that your data from one service is never overwritten by another.
type: This specifies the service type and its version using the format
Consult the table below that lists all Platform.sh maintained services, along with their
versions. The links will take you to each service’s dedicated page in the documentation.
6.5, 7.2, 7.5, 7.7, 7.9 InfluxDB
1.2, 1.3, 1.7, 1.8 Kafka
2.1, 2.2, 2.3, 2.4, 2.5 MariaDB
10.0, 10.1, 10.2, 10.3, 10.4, 10.5 Memcached
1.4, 1.5, 1.6 MongoDB
3.0, 3.2, 3.4, 3.6 Network Storage
1.0 Oracle MySQL
5.7, 8.0 PostgreSQL
9.6, 10, 11, 12, 13 RabbitMQ
3.5, 3.6, 3.7, 3.8 Redis
3.2, 4.0, 5.0, 6.0 Solr
7.7, 8.0, 8.4, 8.6 Varnish
diskattribute configures the amount of persistent disk that will be allocated between all of your services. Projects by default are allocated 5 GB (5120 MB), and that space can be distributed across all of your services. Note that not all services require disk space. If you specify a
diskattribute for a service that doesn’t use it, like Redis, you will receive an error when trying to push your changes.
Each language and framework may have additional attributes that you will need to include in
.platform/services.yamldepending on the needs of your application. To find out what else you may need to include to configure your services, consult
The Services documentation for Platform.sh
The documentation goes into far more extensive detail of which attributes can also be included for service configuration, and should be used as your primary reference.
Language-specific templates for Platform.sh Projects:
.platform/services.yamlfile from the simple template above to other templates when writing your own.
Platform.sh provides managed services, and each service comes with considerable default configuration that you will not have to include yourself in
Next, you will next need to tell Platform.sh how to build and deploy your application using the