Skip to content

Commit

Permalink
Merge branch 'main' into upsun-migrate-languages
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwcarlson committed Feb 14, 2024
2 parents 4ed46bb + 8a98119 commit f04ad3f
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion sites/friday/src/create-apps/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ and, if appropriate, adjust its behavior accordingly.
When defining a [worker](../create-apps/app-reference.md#workers) instance,
keep in mind what mount behavior you want.

`tmp` local mounts are a separate storage area for each instance,
`tmp` and `instance` local mounts are a separate storage area for each instance,
while `storage` mounts can be shared between instances.

For example, you can define a `storage` mount (called `shared_dir`) to be used by a `web` instance,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 19 additions & 5 deletions sites/platform/src/administration/web/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,32 @@ description: |

{{% description %}}

![Overview of projects in the Console](/images/management-console/all-projects-revised.png "0.5")
{{% version/specific %}}

![Overview of projects in the Console](/images/management-console/psh-console-main-view.png "0.6")

<--->

![Overview of projects in the Console](/images/console/upsun-console-main-view.png "0.6")

{{% /version/specific %}}

This Console offers you ways to manage projects and environments other than the [command line interface (CLI))](../cli/_index.md).

## Project list

{{% version/specific %}}
The [main Console page](https://console.platform.sh) gives you an overview of all your projects.
You can narrow the list down by searching for specific projects or choosing a specific organization from the menu.
Opening the [Console](https://console.platform.sh) takes you to the first organization you joined as a
{{% vendor/name %}} user.
You get an overview of all your projects within that organization.
You can narrow the list down by searching for specific projects,
or switch to a different organization from the menu in the top left-hand corner.
<--->
The [main Console page](https://console.upsun.com) gives you an overview of all your projects.
You can narrow the list down by searching for specific projects or choosing a specific organization from the menu.
Opening the [Console](https://console.upsun.com) takes you to the first organization you joined as a
{{% vendor/name %}} user.
You get an overview of all your projects within that organization.
You can narrow the list down by searching for specific projects,
or switch to a different organization from the menu in the top left-hand corner.
{{% /version/specific %}}

Once you select a project, you can [configure the project settings](./configure-project.md).
Expand Down
24 changes: 5 additions & 19 deletions sites/platform/src/create-apps/app-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ See how to [troubleshoot the warning](./troubleshoot-mounts.md#overlapping-folde

| Name | Type | Required | Description |
| ------------- | -------------------- | -------- | ----------- |
| `source` | `storage`, `tmp`, or `service` | Yes | Specifies the type of the mount:<br/><br/>- By design, `storage` mounts can be shared between instances of the same app. You can also configure them so they are [shared between different apps](#share-a-mount-between-several-apps).<br/><br/>- `tmp` mounts are local ephemeral mounts, where an external directory is mounted to the `/tmp` directory of your app.<br/>The content of a `tmp` mount **may be removed during infrastructure maintenance operations**. Therefore, `tmp` mounts allow you to **store files that you’re not afraid to lose**, such as your application cache that can be seamlessly rebuilt.<br/>Note that the `/tmp` directory has **a maximum allocation of 8 GB**.<br/><br/>- `service` mounts can be useful if you want to explicitly define and use a [Network Storage](/add-services/network-storage.md) service to share data between different apps (instead of using a `storage` mount).|
| `source` | `storage`, `instance`, `tmp` (also called `temporary`), or `service` | Yes | Specifies the type of the mount:<br/><br/>- By design, `storage` mounts can be shared between instances of the same app. You can also configure them so they are [shared between different apps](#share-a-mount-between-several-apps).<br/><br/>-`instance` mounts are local mounts. Unique to your app, they are useful to store files that remain local to the app instance, such as application logs.<br/><br/>- `tmp` (or `temporary`) mounts are local ephemeral mounts, where an external directory is mounted to the `/tmp` directory of your app.<br/>The content of a `tmp` mount **may be removed during infrastructure maintenance operations**. Therefore, `tmp` mounts allow you to **store files that you’re not afraid to lose**, such as your application cache that can be seamlessly rebuilt.<br/>Note that the `/tmp` directory has **a maximum allocation of 8 GB**.<br/><br/>- `service` mounts can be useful if you want to explicitly define and use a [Network Storage](/add-services/network-storage.md) service to share data between different apps (instead of using a `storage` mount).|
| `source_path` | `string` | No | Specifies where the mount points **inside the [external directory](#mounts)**.<br/><br/> - If you explicitly set a `source_path`, your mount points to a specific subdirectory in the external directory. <br/><br/> - If the `source_path` is an empty string (`""`), your mount points to the entire external directory.<br/><br/> - If you don't define a `source_path`, {{% vendor/name %}} uses the {{< variable "MOUNT_PATH" >}} as default value, without leading or trailing slashes.</br>For example, if your mount lives in the `/web/uploads/` directory in your app container, it will point to a directory named `web/uploads` in the external directory. </br></br> **WARNING:** Changing the name of your mount affects the `source_path` when it's undefined. See [how to ensure continuity](#ensure-continuity-when-changing-the-name-of-your-mount) and maintain access to your files. |
| `service` | `string` | | The purpose of the `service` key depends on your use case.</br></br> In a multi-app context where a `storage` mount is shared between apps, `service` is required. Its value is the name of the app whose mount you want to share. See how to [share a mount between several apps](#share-a-mount-between-several-apps).</br></br> In a multi-app context where a [Network Storage service](../add-services/network-storage.md) (`service` mount) is shared between apps, `service` is required and specifies the name of that Network Storage. |

Expand Down Expand Up @@ -524,20 +524,6 @@ Follow these steps:
{{% /note %}}

Note that another way to share data between apps through a mount is by explicitly [defining a Network Storage service](/add-services/network-storage.md).

### Local mounts

If you need a local mount (i.e. unique per container),
{{% vendor/name %}} allows you to mount a directory within the `/tmp` directory of your app.
However, the following limitations apply:

- Content from `tmp` mounts is removed when your app container is moved to another host during an infrastructure maintenance operation
- The `/tmp` directory has a [maximum allocation of 8 GB](/create-apps/troubleshoot-disks.md#no-space-left-on-device)

Therefore, `tmp` mounts are ideal to store non-critical data, such as your application cache which can be seamlessly rebuilt,
but aren't suitable for storing files that are necessary for your app to run smoothly.

Note that {{% vendor/name %}} will provide new local mounts in the near future.

{{% /version/only %}}

Expand Down Expand Up @@ -623,10 +609,10 @@ See how to set up [alternate start commands on PHP](../languages/php/_index.md#a

### Upstream

| Name | Type | Required | Description |
| --------------- | ------------------- | -------- | ----------- |
| `socket_family` | `tcp` or `unix` | | Whether your app listens on a Unix or TCP socket. Defaults to `tcp`. |
| `protocol` | `http` or `fastcgi` | | Whether your app receives incoming requests over HTTP or FastCGI. Default varies based on [image `type`](#types). |
| Name | Type | Required | Description | Default |
| --------------- | ------------------- | -------- | ----------- | ----------- |
| `socket_family` | `tcp` or `unix` | | Whether your app listens on a Unix or TCP socket. | Defaults to `tcp` for all [image types](#types) except PHP; for PHP image types the default is `unix`. |
| `protocol` | `http` or `fastcgi` | | Whether your app receives incoming requests over HTTP or FastCGI. | Default varies based on [image `type`](#types). |

For PHP, the defaults are configured for PHP-FPM and shouldn't need adjustment.
For all other containers, the default for `protocol` is `http`.
Expand Down
8 changes: 4 additions & 4 deletions sites/platform/src/create-apps/hooks/hooks-comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ not [`worker` instances](../app-reference.md#workers).
You can access other services at this stage (such as MySQL, Solr, Redis).
The disk where the application lives is read-only at this point.

This hook should be used when something needs to run once for all instances of an app when new code is deployed.
This hook should be used when something needs to run once when new code is deployed.
It isn't run when a host is restarted (such as during region maintenance),
so anything that needs to run each time an app starts (regardless of whether there's new code)
should go in the `start` key in [your `web` configuration](../app-reference.md#web-commands).
For example, clearing the cache for [ephemeral Redis](../../add-services/redis.md#ephemeral-redis).
so anything that needs to run each time an instance of an app starts (regardless of whether there's new code)
should go in the `pre_start` key in [your `web` configuration](../app-reference.md#web-commands).
For example, clearing the cache.

Be aware: The deploy hook blocks the site accepting new requests.
If your `deploy` hook is only a few seconds,
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions themes/psh-docs/layouts/shortcodes/guides/config-desc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ giving you a fully isolated running site for each active environment.
Once an environment is activated, your app is deployed through a cluster of containers.
You can configure these containers in three ways, each corresponding to a [YAML file](/learn/overview/yaml):

- **Configure apps** in a `{{ partial "vendor/configfile" (dict "context" . "config" "services") }}` file.
- **Configure apps** in a `{{ partial "vendor/configfile" (dict "context" . "config" "app") }}` file.
This controls the configuration of the container where your app lives.
- **Add services** in a `{{ partial "vendor/configfile" (dict "context" . "config" "services") }}` file.
This controls what additional services are created to support your app,
Expand All @@ -26,7 +26,7 @@ Start by creating empty versions of each of these files in your repository:

```bash
# Create empty {{ .Site.Params.vendor.name }} configuration files
mkdir -p .platform && touch {{ partial "vendor/configfile" (dict "context" . "config" "services") }} && touch {{ partial "vendor/configfile" (dict "context" . "config" "routes") }}{{ if not (.Get "noService") }} && touch {{ partial "vendor/configfile" (dict "context" . "config" "services") }}{{ end }}
mkdir -p .platform && touch {{ partial "vendor/configfile" (dict "context" . "config" "services") }} && touch {{ partial "vendor/configfile" (dict "context" . "config" "routes") }}{{ if not (.Get "noService") }} && touch {{ partial "vendor/configfile" (dict "context" . "config" "app") }}{{ end }}
```
{{ if isset .Params "platformify" }}
Expand Down

0 comments on commit f04ad3f

Please sign in to comment.