Skip to content

Commit 50577de

Browse files
flovntpAnouckColsonchadcarlson
authored
Composable image (#3879)
* first draft for composable image on Upsun side (only for now) * report changes to platform folder * some improvement on Upsun composable image * adding multiple runtimes note + NixOs presentation draft * adding note at the beginning of PHP doc page (draft) * adding disclaimer on languages and align P.sh with Upsun composable * removing top level key from Upsun + reformat code + adding TODO block in the HTML * Apply doc review and suggestions from Jerome * missing replacement of built-in image * split codetab for PHP ext and Python to separate section * remaining built-in image * remaining built-in image * Move PHP-specific content and redorder side nav * Remove extra space * PHP extensions update * Update PSH composable image page * Update PSH section index page * Reorder side nav for PSH * Fix numbering * Further review suggestions applied * Fix links. Remove duplicated file on conflict resolution. * Add redirect notes where relevant (for type and extensions). * Add the sticky note option, even though its not yet enabled. * Fix failing 'Check internal links' for platform docs. * Match fixed links on upsun docs. * Fix note. * Fix platform config from using upsun config. * Fix platform file name. * socket_family/protocol for primary runtimes * Update example configuration for PHP runtime config. * Fix links post-merge. * Link checks on builds. * Fix side nav --------- Co-authored-by: Anouck Colson <[email protected]> Co-authored-by: chadcarlson <[email protected]>
1 parent 02733b0 commit 50577de

File tree

198 files changed

+4542
-1909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+4542
-1909
lines changed

sites/platform/src/add-services/_index.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The following table presents the keys you can define for each service:
7070
| `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. |
7171
| `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). |
7272
| `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/single-runtime-image.md#relationships). The `endpoint_name` for apps is always `http`. |
7474

7575
##### Disk
7676

@@ -90,7 +90,10 @@ Note that service containers in preview environments are always set to size `S`.
9090

9191
### 2. Connect the service
9292

93-
To connect the service, use the following configuration:
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/single-runtime-image.md#relationships).
95+
96+
The relationship follows this pattern:
9497

9598
```yaml {configFile="app"}
9699
# Other options...
@@ -105,12 +108,12 @@ relationships:
105108
You can define `<SERVICE_NAME>` as you like, so long as it's unique between all defined services
106109
and matches in both the application and services configuration.
107110

108-
The example above leverages [default endpoint](/create-apps/app-reference#relationships) configuration for relationships.
109-
That is, it uses default endpoints behind-the-scenes, providing a [relationship](/create-apps/app-reference#relationships)
111+
The example above leverages [default endpoint](/create-apps/app-reference/single-runtime-image#relationships) configuration for relationships.
112+
That is, it uses default endpoints behind-the-scenes, providing a [relationship](/create-apps/app-reference/single-runtime-image#relationships)
110113
(the network address a service is accessible from) that is identical to the _name_ of that service.
111114

112115
Depending on your needs, instead of default endpoint configuration,
113-
you can use [explicit endpoint configuration](/create-apps/app-reference#relationships).
116+
you can use [explicit endpoint configuration](/create-apps/app-reference/single-runtime-image#relationships).
114117

115118
An example relationship to connect to the databases given in the [example in step 1](#1-configure-the-service):
116119

sites/platform/src/add-services/network-storage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: -30
55

66
{{% vendor/name %}} supports internal "storage as a service" to provide a file store that can be shared between different application containers.
77

8-
The network storage service enables a new kind of [mount](../create-apps/app-reference.md#mounts)
8+
The network storage service enables a new kind of [mount](/create-apps/app-reference/single-runtime-image.md#mounts)
99
that refers to a shared service rather than to a local directory.
1010
Your apps can use any combination of `local` and `service` mounts.
1111

@@ -123,7 +123,7 @@ and the `done` mount refers to the same directory as the `web/uploads/done` dire
123123

124124
## Worker instances
125125

126-
When defining a [worker](../create-apps/app-reference.md#workers) instance,
126+
When defining a [worker](/create-apps/app-reference/single-runtime-image.md#workers) instance,
127127
keep in mind what mount behavior you want.
128128

129129
`local` mounts are a separate storage area for each instance,

sites/platform/src/add-services/redis.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ relationships:
131131

132132
You can define `<SERVICE_NAME>` as you like, so long as it’s unique between all defined services and matches in both the application and services configuration.
133133

134-
The example above leverages [default endpoint](/create-apps/app-reference#relationships) configuration for relationships. That is, it uses default endpoints behind-the-scenes, providing a [relationship](/create-apps/app-reference#relationships) (the network address a service is accessible from) that is identical to the name of that service.
134+
The example above leverages [default endpoint](/create-apps/app-reference/single-runtime-image#relationships) configuration for relationships. That is, it uses default endpoints behind-the-scenes, providing a [relationship](/create-apps/app-reference/single-runtime-image#relationships) (the network address a service is accessible from) that is identical to the name of that service.
135135

136-
Depending on your needs, instead of default endpoint configuration, you can use [explicit endpoint configuration](/create-apps/app-reference#relationships).
136+
Depending on your needs, instead of default endpoint configuration, you can use [explicit endpoint configuration](/create-apps/app-reference/single-runtime-image#relationships).
137137

138138
With the above definition, the application container now has [access to the service](#use-in-app) via the relationship `<RELATIONSHIP_NAME>` and its corresponding [`PLATFORM_RELATIONSHIPS` environment variable](/development/variables/use-variables#use-provided-variables).
139139

@@ -247,9 +247,9 @@ relationships:
247247

248248
You can define `<SERVICE_NAME>` as you like, so long as it’s unique between all defined services and matches in both the application and services configuration.
249249

250-
The example above leverages [default endpoint](/create-apps/app-reference#relationships) configuration for relationships. That is, it uses default endpoints behind-the-scenes, providing a [relationship](/create-apps/app-reference#relationships) (the network address a service is accessible from) that is identical to the name of that service.
250+
The example above leverages [default endpoint](/create-apps/app-reference/single-runtime-image#relationships) configuration for relationships. That is, it uses default endpoints behind-the-scenes, providing a [relationship](/create-apps/app-reference/single-runtime-image#relationships) (the network address a service is accessible from) that is identical to the name of that service.
251251

252-
Depending on your needs, instead of default endpoint configuration, you can use [explicit endpoint configuration](/create-apps/app-reference#relationships).
252+
Depending on your needs, instead of default endpoint configuration, you can use [explicit endpoint configuration](/create-apps/app-reference/single-runtime-image#relationships).
253253

254254
With the above definition, the application container now has [access to the service](#use-in-app) via the relationship `<RELATIONSHIP_NAME>` and its corresponding [`PLATFORM_RELATIONSHIPS` environment variable](/development/variables/use-variables#use-provided-variables).
255255

sites/platform/src/add-services/varnish.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ graph LR
4848

4949
The `relationships` block defines the connection between Varnish and your app.
5050
You can define <code>{{< variable "RELATIONSHIP_NAME" >}}</code> as you like.
51-
<code>{{< variable "APP_NAME" >}}</code> should match your app's `name` in the [app configuration](../create-apps/app-reference.md).
51+
<code>{{< variable "APP_NAME" >}}</code> should match your app's `name` in the [app configuration](/create-apps/app-reference/single-runtime-image.md).
5252

5353
The `configuration` block must reference a VCL file inside the `{{< vendor/configdir >}}` directory.
5454
The `path` defines the file relative to the `{{< vendor/configdir >}}` directory.
@@ -285,7 +285,7 @@ which provides access to some Varnish analysis and debugging tools.
285285

286286
You can't use it from an app fronted by Varnish because of the restriction with [circular relationships](#circular-relationships).
287287
To access the stats, create a **separate app** (`stats-app`) with a relationship *to* Varnish, but not *from* it.
288-
Define [app configuration](../create-apps/app-reference.md) similar to the following:
288+
Define [app configuration](/create-apps/app-reference/single-runtime-image.md) similar to the following:
289289

290290
```yaml {configFile="apps"}
291291
# The name of the app container. Must be unique within a project.
@@ -340,5 +340,5 @@ To access the Varnish stats endpoint from the command line:
340340

341341
1. Connect to your stats app [using SSH](../development/ssh/_index.md): `{{% vendor/cli %}} ssh --app stats-app`
342342
(replace `stats-app` with the name you gave the app).
343-
2. Display the [relationships array](../create-apps/app-reference.md#relationships) with `echo ${{< vendor/prefix >}}_RELATIONSHIPS | base64 -d | jq .`,
343+
2. Display the [relationships array](/create-apps/app-reference/single-runtime-image.md#relationships) with `echo ${{< vendor/prefix >}}_RELATIONSHIPS | base64 -d | jq .`,
344344
3. Query Varnish with `curl {{< variable "HOST" >}}:{{<variable "PORT" >}}/stats`, replacing `{{< variable "HOST" >}}` and `{{< variable "PATH" >}}` with the values from Step 2.

sites/platform/src/administration/cli/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ eval $({{% vendor/cli %}} completion)
211211
### Run commands on your container
212212
213213
You can use the {{% vendor/name %}} CLI to run commands on your container.
214-
You can use any command you've added in [dependencies](../../create-apps/app-reference.md#dependencies)
215-
or a [hook](../../create-apps/app-reference.md#hooks).
214+
You can use any command you've added in [dependencies](/create-apps/app-reference/single-runtime-image.md#dependencies)
215+
or a [hook](/create-apps/app-reference/single-runtime-image.md#hooks).
216216

217217
The syntax looks like the following:
218218

sites/platform/src/administration/users.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebarTitle: Users
55
description: Manage user access and permissions across all your projects and organizations.
66
---
77

8-
{{% vendor/name %}} offers very granular and flexible user permissions across projects and organizations.
8+
{{% vendor/name %}} offers very granular and flexible user permissions across projects and organizations.
99
When a user is added to a project, they are automatically added to your organization.
1010

1111
## Manage project access
@@ -42,7 +42,7 @@ A user can have one of the following roles on an environment type which grants t
4242
| Contributor | Yes | Yes | Yes | Yes | No | No |
4343
| Viewer | Yes | No | Yes | No | No | No |
4444

45-
To customize which roles can use SSH, set [`access` in your app configuration](../create-apps/app-reference.md#access).
45+
To customize which roles can use SSH, set [`access` in your app configuration](/create-apps/app-reference/single-runtime-image.md#access).
4646

4747
### View a user's permissions across all of the projects in your organization
4848

@@ -170,7 +170,7 @@ title=In the Console
170170
{{< /codetabs >}}
171171

172172
To apply SSH access changes after you add a remove a user from a project or environment type,
173-
[trigger a redeploy](../development/troubleshoot.md#force-a-redeploy).
173+
[trigger a redeploy](../development/troubleshoot.md#force-a-redeploy).
174174

175175
### Remove a user from a project
176176

@@ -243,7 +243,7 @@ you can invite other users to your organization and grant them the following per
243243

244244
Users with the **Manage users** (`members`) permission can add, edit, or remove _any_ user's permissions except their own.
245245

246-
Users with the **Manage billing** (`billing`) permission automatically are granted **List projects** (`projects:list`) permission.
246+
Users with the **Manage billing** (`billing`) permission automatically are granted **List projects** (`projects:list`) permission.
247247
That is, they are able to see all organization projects once given billing rights.
248248

249249
{{< /note >}}

sites/platform/src/administration/web/configure-environment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ There are also additional options:
4141
* **Code**
4242
* **CLI** for the command to get your project set up locally with the [{{% vendor/name %}} CLI](../cli/_index.md).
4343
* **Git** for the command to clone the codebase via Git.
44-
44+
4545
If you're using {{% vendor/name %}} as your primary remote repository, the command clones from the project.
4646
If you have set up an [external integration](../../integrations/source/_index.md),
4747
the command clones directly from the integrated remote repository.
@@ -61,7 +61,7 @@ If this message isn't updated once your [default environment](../../environments
6161
follow these steps:
6262

6363
1. Check that [you have defined routes](../../define-routes/_index.md) for your default environment.
64-
2. Verify that your [application](../../create-apps/app-reference.md), [services](../../add-services/_index.md), and [routes](../../define-routes/_index.md) configurations are correct.
64+
2. Verify that your [application](/create-apps/app-reference/single-runtime-image.md), [services](../../add-services/_index.md), and [routes](../../define-routes/_index.md) configurations are correct.
6565
3. Check that your default environment is [active](../../environments/deactivate-environment.md#reactivate-an-environment).
6666

6767
## Environment settings

sites/platform/src/create-apps/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Within a single project, you can have one or more apps and each app can have mul
1616
Instances are where the same code can be run with different configurations,
1717
such as one for external communication and one for background processes.
1818
All of the apps and instances are configured with the same syntax.
19-
You can find a [complete reference](./app-reference.md) of all possible settings.
19+
You can find a [complete reference](/create-apps/app-reference/single-runtime-image.md) of all possible settings.
2020

2121
## A minimal application
2222

@@ -69,23 +69,23 @@ If you want to use one of the [databases or other services {{% vendor/name %}} p
6969
set it up by following these steps:
7070
7171
1. Configure the service based on the documentation for that service.
72-
1. Use the information from that service inside your app's [`relationships` definition](./app-reference.md#relationships)
72+
1. Use the information from that service inside your app's [`relationships` definition](/create-apps/app-reference/single-runtime-image.md#relationships)
7373
to configure how your app communicates with the service.
7474

7575
## Control the build and deploy process
7676

7777
Your app generally needs to undergo some steps to be turned from the code in your Git repository into a running app.
78-
If you're running a PHP or Node.js app, this starts with the [build flavor](./app-reference.md#build),
78+
If you're running a PHP or Node.js app, this starts with the [build flavor](/create-apps/app-reference/single-runtime-image.md#build),
7979
which runs a default set of tasks.
80-
Then any [global dependencies](./app-reference.md#dependencies) can be installed.
80+
Then any [global dependencies](/create-apps/app-reference/single-runtime-image.md#dependencies) can be installed.
8181

8282
Once these optional tasks are done, you can run [hooks](./hooks/_index.md) at various points in the process.
8383
Hooks are places for your custom scripts to control how your app is built and deployed.
8484

8585
## Configure what's served
8686

8787
Once your app is built, it needs a defined way to communicate with the outside world.
88-
Define its behavior with a [`web` instance](./app-reference.md#web).
88+
Define its behavior with a [`web` instance](/create-apps/app-reference/single-runtime-image.md#web).
8989
There you can set what command runs every time your app is restarted,
9090
how dynamic requests are handled, and how to respond with static files.
9191

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "App reference"
3+
weight: 4
4+
description: Configure your app and control how it's built and deployed on {{% vendor/name %}}.
5+
layout: single
6+
---
7+
8+
To define your app, you can either use one of {{% vendor/name %}}'s [single-runtime image](/create-apps/app-reference/single-runtime-image.md)
9+
or its [composable image (BETA)](/create-apps/app-reference/composable-image.md).
10+
11+
## Single-runtime image
12+
13+
{{% vendor/name %}} provides and maintains a list of single-runtime images you can use for each of your application containers.</br>
14+
See [all of the options you can use](/create-apps/app-reference/single-runtime-image.md) to define your app using a single-runtime image.
15+
16+
## Composable image (BETA)
17+
18+
The {{% vendor/name %}} composable image provides more flexibility than single-runtime images.
19+
When using a composable image, you can define a stack (or group of packages) for your application container to use.
20+
21+
There are over 80,000 packages available from the [Nix Packages collection](https://search.nixos.org/) that you can add to your stack.
22+
You can add as many packages to your application container as you need.
23+
24+
{{% note %}}
25+
26+
{{% vendor/name %}} guarantees optimal user experience with the specific [set of packages](/create-apps/app-reference/composable-image.md#supported-nix-packages) it supports.
27+
You can use any other package available from the [Nix Packages collection](https://search.nixos.org/), including unstable ones,
28+
but NixOs is reponsible for their support.
29+
30+
{{% /note %}}
31+
32+
See [all of the options you can use](/create-apps/app-reference/composable-image.md) to define your app using the composable image.

0 commit comments

Comments
 (0)