You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The name of the service container. Must be unique within a project.
41
+
mariadb:
42
+
type: mariadb:{{% latest "mariadb" %}}
43
+
# The name of the service container. Must be unique within a project.
44
+
postgresql:
45
+
type: postgresql:{{% latest "postgresql" %}}
44
46
```
45
47
46
48
This YAML file contains a dictionary defining all of the services you want to use.
47
49
The top-level key `services` defines an object of all of the services to be provisioned for the project.
48
-
Below that, come custom service names ({{<variable "SERVICE_NAME" >}}; in the example, `database1` and `database2`), which you use to identify services in step 2.
50
+
Below that, come custom service names ({{<variable "SERVICE_NAME" >}}; in the example, `mariadb` and `postgresql`), which you use to identify the service in step 2.
49
51
50
52
You can give it any name you want with lowercase alphanumeric characters, hyphens, and underscores.
51
53
@@ -65,7 +67,7 @@ The following table presents the keys you can define for each service:
| `type` | `string` | Yes | One of the [available services](#available-services) in the format `type:version`. |
67
69
| `configuration` | dictionary | For some services | Some services have additional specific configuration options that can be defined here, such as specific endpoints. See the given service page for more details. |
68
-
|`relationships`| dictionary | For some services | Some services require a relationship to your app. The content of the dictionary has the same type as the `relationships` dictionary for [app configuration](../create-apps/app-reference.md#relationships). The `endpoint_name` for apps is always `http`. |
70
+
| `relationships` | dictionary | For some services | Some services require a relationship to your app. The content of the dictionary has the same type as the `relationships` dictionary for [app configuration](/create-apps/app-reference.md#relationships). The `endpoint_name` for apps is always `http`. |
69
71
70
72
##### Resources (CPU, RAM, disk)
71
73
@@ -78,44 +80,51 @@ For more information, see how to [manage resources](/manage-resources.md).
78
80
79
81
### 2. Connect the service
80
82
81
-
Once you have configured a service, you need to create a relationship to connect it to an app.
82
-
This is done in your [app configuration for relationships](../create-apps/app-reference.md#relationships).
83
-
84
-
The relationship follows this pattern:
83
+
To connect the service, use the following configuration:
# The name of the service container. Must be unique within a project.
45
+
postgresql:
45
46
type: postgresql:{{% latest "postgresql" %}}
46
47
disk: 1024
47
-
{{% /snippet %}}
48
48
```
49
49
50
50
This YAML file is a dictionary defining all of the services you want to use.
51
-
The top-level key is a custom service name ({{<variable "SERVICE_NAME" >}}; in the example, `database1` and `database2`), which you use to identify the service in step 2.
51
+
The top-level key is a custom service name ({{<variable "SERVICE_NAME" >}}; in the example, `mariadb` and `postgresql`), which you use to identify the service in step 2.
52
52
53
53
You can give it any name you want with lowercase alphanumeric characters, hyphens, and underscores.
54
54
@@ -70,7 +70,7 @@ The following table presents the keys you can define for each service:
70
70
| `disk` | `integer` | For some services | The size in [MB](/glossary.md#mb) of the [persistent disk](#disk) allocated to the service. Can't be set for memory-resident-only services such as `memcache` and `redis`. Limited by your plan settings. |
71
71
| `size` | `string` | | How many CPU and memory [resources to allocate](#size) to the service. Possible values are `AUTO`, `S`, `M`, `L`, `XL`, `2XL`, and `4XL`. Limited by your plan settings.<BR><BR>When `AUTO` applies, available resources are automatically balanced out based on the number of containers on your plan, so that no container is oversized compared to the others. To view the actual sizes of your containers, check the **Environment Configuration** section in your deployment [activity logs](../increase-observability/logs/access-logs.md#activity-logs). |
72
72
| `configuration` | dictionary | For some services | Some services have additional specific configuration options that can be defined here, such as specific endpoints. See the given service page for more details. |
73
-
|`relationships`| dictionary | For some services | Some services require a relationship to your app. The content of the dictionary has the same type as the `relationships` dictionary for [app configuration](../create-apps/app-reference.md#relationships). The `endpoint_name` for apps is always `http`. |
73
+
| `relationships` | dictionary | For some services | Some services require a relationship to your app. The content of the dictionary has the same type as the `relationships` dictionary for [app configuration](/create-apps/app-reference.md#relationships). The `endpoint_name` for apps is always `http`. |
74
74
75
75
##### Disk
76
76
@@ -90,24 +90,16 @@ Note that service containers in preview environments are always set to size `S`.
90
90
91
91
### 2. Connect the service
92
92
93
-
Once you have configured a service, you need to create a relationship to connect it to an app.
94
-
This is done in your [app configuration for relationships](../create-apps/app-reference.md#relationships).
95
-
96
-
The relationship follows this pattern:
93
+
To connect the service, use the following configuration:
0 commit comments