No more default configuration files
When Platform.sh launched, the majority of our business was Drupal 7 sites running Drupal Commerce. While we still host many of those, our business has expanded to cover many application stacks and languages. Drupal 8 has been out for 8 months now, Symfony’s market is growing, and we support both PHP and NodeJs with more languages on the way (stay tuned!).
As a result some assumptions we baked into the system no longer make sense for the majority of or users. We are therefore removing the default Platform.sh configuration files that were previously used if your project didn’t include one.
Wait, but what about my existing sites!
If you already have an existing project with Platform.sh, it is completely unaffected. This change only affects newly created projects as of Monday 25 July 2016.
We still recommend that all projects ensure they have the appropriate configuration files committed to Git, but only new projects are technically required to do so.
Whew. OK, so what’s the problem?
There are three files that drive your entire cluster with Platform.sh:
.platform.app.yamldefines your application container, where your code runs.
.platform/routes.yamldefines your routing container, and how it maps and caches incoming requests to your application container.
.platform/services.yamldefines what other services should be included in each cluster, such as MySQL, Redis, or Elasticsearch.
(No, really, that’s it. That’s your entire server cluster definition. Neat, eh?)
Previously, if one of those files was missing we would create a default file automatically. Those default files were designed around a specific use case: Drupal 7 running on PHP 5.4 with Redis caching and Solr for search. However, that is increasingly not the typical case; Drupal 8 is growing fast, PHP 5.4 is no longer supported by the PHP team, the various services have new versions available, and Platform.sh offers a lot more than just Drupal and PHP. (A default PHP container with
drush make makes little sense if your application is written in Node.js…) That makes those defaults less and less useful to keep around.
It also meant that to entirely disable additional services, say for a statically generated site (like the Platform.sh site itself), required adding a blank file to the repository to override the default 3 services. That’s just silly.
So what changes?
We no longer add default files. No file, no behavior. That means you must provide, at least, a
.platform.app.yaml file and a
.platform/routes.yaml file for a site to work. If you don’t provide those, trying to push a branch to our Git repository will fail as the code cannot be deployed. (The
.platform/services.yaml is optional; if you don’t need any services, skipping this file will simply not create any.)
If you’re already in the habit of adding those files to your Git repository for a new project, congratulations, nothing changes for you. :-)
We are also dropping version-defaults for the app container and services. That is, if you ask for a mysql service you must also specify the version; we won’t magically pick one for you if not specified, for the same reason: The defaults would be old-forever. We want you to be able to move your site to the latest and greatest version of your language and services of choice on your schedule, not ours.
If you want to see the old defaults that were created, in case you want to use them yourself, they’re listed in in our documentation site.
For more information on those configuration files, see the documentation: