Platform.sh is now Upsun. Click here to learn more
Upsun Fixed User Documentation

Upsun Fixed YAML structure

Try Upsun for 15 days
After that, enjoy the same, game-changing Upsun features for less with the First Project Incentive!¹ A monthly $19 perk!
Activate your 15-day trial
¹Terms and conditions apply

In addition to the basic functions you should be familiar with, YAML structure is important. Upsun Fixed accepts a certain structure for YAML configuration files.

When you run the platform project:init command, three default YAML configuration files are generated in the .platform folder and at the root of your source code. They contain the minimum default configuration based on your detected local stack. These YAML files are a good starting point before customization.

.
├── .platform
|   ├── routes.yaml
|   └── services.yaml
├── .platform.app.yaml
└── <source code>

These three YAML files configure the following:

Examples Anchor to this heading

.platform.app.yaml

# Complete list of all available properties

# A unique name for the app. Must be lowercase alphanumeric characters.
# Changing the name destroys data associated with the app.
name: "myapp"

# The runtime the application uses.

# Complete list of available runtimes
type: "php:8.2"
...
.platform/services.yaml
# The services of the project.
#
# Each service listed will be deployed
# to power your Upsun Fixed project.
# Full list of available services

mariadb:
  # All available versions are: 10.6, 10.5, 10.4, 10.3
  type: mariadb:10.6
.platform/routes.yaml
# The routes of the project.
#
# Each route describes how an incoming URL is going
# to be processed by Upsun Fixed.
# More information

"https://{default}/":
  type: upstream
  upstream: "myapp:http"

# A basic redirect definition
# More information

"https://www.{default}":
  type: redirect
  to: "https://{default}/"

In these files, you can use any of the available YAML tags you need.

Multi-app Anchor to this heading

In a multiple application context, you can also group all of your app configurations in a global .platform/applications.yaml file. This file contains a list of app configurations, such as:

.platform/applications.yaml
app1:
  type: php:8.3
  source:
    root: app1

app2:
  type: nodejs:20
  source:
    root: app2