Import your own code

Configure services

In the previous step, you created a collection of empty configuration files that have given your project the following structure:

├── .platform
│   ├── routes.yaml
│   └── services.yaml
└── < application code >

Now you will need to include information that will tell how you want your application to connect to its services. An example .platform/services.yaml will look something like this:


# This file defines services you want available to your application.

    type: elasticsearch:7.2
    disk: 256
    size: S
    type: influxdb:1.7
    disk: 256
    size: S
    type: kafka:2.2
    disk: 512
    size: S
    type: memcached:1.4
    size: S
    type: mongodb:3.6
    disk: 1024
    size: S
    type: mariadb:10.4
    disk: 256
    size: S
    type: postgresql:11
    disk: 256
    size: S
    type: rabbitmq:3.7
    disk: 256
    size: S
    type: redis:5.0
    size: S
    type: solr:8.0
    disk: 256
    size: S
                conf_dir: !archive "solr-config"
                core: maincore

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 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 maintained services, along with their type and supported versions. The links will take you to each service's dedicated page in the documentation.

Service type Supported version
Headless Chrome chrome-headless 73
Elasticsearch elasticsearch 6.5, 7.2
InfluxDB influxdb 1.2, 1.3, 1.7
Kafka kafka 2.1, 2.2, 2.3, 2.4
MariaDB mariadb 10.0, 10.1, 10.2, 10.3, 10.4
Memcached memcached 1.4, 1.5, 1.6
MongoDB mongodb 3.0, 3.2, 3.4, 3.6
Network Storage network-storage 1.0
Oracle MySQL oracle-mysql 5.7, 8.0
PostgreSQL postgresql 9.6, 10, 11, 12
RabbitMQ rabbitmq 3.5, 3.6, 3.7, 3.8
Redis redis 3.2, 4.0, 5.0
Solr solr 3.6, 4.1, 6.3, 6.6, 7.6, 7.7, 8.0, 8.4
Varnish varnish 5.6, 6.0
  • disk: The disk attribute 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 disk attribute 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.yaml depending 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

    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 Projects

    Compare the .platform/services.yaml file from the simple template above to other templates when writing your own. provides managed services, and each service comes with considerable default configuration that you will not have to include yourself in .services.yaml.

Next, you will next need to tell how to build and deploy your application using the file.