docs: move Compose extensions to a separate reference page

This commit is contained in:
Pasha Sviderski
2026-04-09 20:24:48 +10:00
parent f2f6fee89a
commit f317dde168
7 changed files with 132 additions and 124 deletions
@@ -141,7 +141,7 @@ This generates tags like:
`uc deploy` renders the image templates when it loads the Compose file and then uses the resulting names for the build
and deploy stages.
See the [Image tag template](../../8-compose-file-reference/2-image-tag-template.md) reference for all available
See the [Image tag template](../../8-compose-file-reference/3-image-tag-template.md) reference for all available
template variables and functions.
### Separate build and deploy steps
@@ -338,7 +338,7 @@ services:
With this configuration, `uc deploy` and other commands using the Compose file will always target the `prod` context,
regardless of your currently active context. You can still override it with the `--context` flag if needed.
See [`x-context`](../../8-compose-file-reference/1-support-matrix.md#x-context) for more details.
See [`x-context`](../../8-compose-file-reference/2-extensions.md#x-context) for more details.
## Use a different Compose file location
@@ -1,13 +1,13 @@
# Deploy to specific machines
Deploy services to specific machines in your cluster using the
[`x-machines`](../../8-compose-file-reference/1-support-matrix.md#x-machines) extension in your Compose file.
[`x-machines`](../../8-compose-file-reference/2-extensions.md#x-machines) extension in your Compose file.
## When to target specific machines
By default, Uncloud randomly chooses available machines to run your services on, evenly spreading multiple replicas of a
service across all machines for high availability. You can restrict which machines can run your service using the
[`x-machines`](../../8-compose-file-reference/1-support-matrix.md#x-machines) extension in your Compose file.
[`x-machines`](../../8-compose-file-reference/2-extensions.md#x-machines) extension in your Compose file.
This is useful when you want to:
@@ -33,7 +33,7 @@ Uncloud doesn't automatically scale global services to new machines.
## Deploy to a subset of machines
You can combine the `global` mode with [`x-machines`](../../8-compose-file-reference/1-support-matrix.md#x-machines)
You can combine the `global` mode with [`x-machines`](../../8-compose-file-reference/2-extensions.md#x-machines)
to deploy one container to each specified machine:
```yaml title="compose.yaml"
@@ -29,7 +29,7 @@ changes do not persist after the hook finishes, except for changes written to sh
## Usage
Add the [`x-pre_deploy`](../../8-compose-file-reference/1-support-matrix.md#x-pre_deploy) extension to a service in your
Add the [`x-pre_deploy`](../../8-compose-file-reference/2-extensions.md#x-pre_deploy) extension to a service in your
Compose file. The only required attribute is `command`, which can be a string or a list of strings, just like the
service's [`command`](https://github.com/compose-spec/compose-spec/blob/main/05-services.md#command).
@@ -54,7 +54,7 @@ hook and regular service containers.
Since your command runs in the same image as the service, any tools or dependencies it needs must be installed in that
image.
See [`x-pre_deploy`](../../8-compose-file-reference/1-support-matrix.md#x-pre_deploy) for all available attributes and
See [`x-pre_deploy`](../../8-compose-file-reference/2-extensions.md#x-pre_deploy) for all available attributes and
their defaults.
### Database migrations
@@ -203,7 +203,7 @@ Most database migration tools handle this naturally since they track which migra
## See also
- [`x-pre_deploy` reference](../../8-compose-file-reference/1-support-matrix.md#x-pre_deploy): All available attributes
- [`x-pre_deploy` reference](../../8-compose-file-reference/2-extensions.md#x-pre_deploy): All available attributes
and their defaults
- [Rolling deployments](4-rolling-deployments.md): How Uncloud updates containers with zero downtime
- [Deploy an app](1-deploy-app.md): Build and deploy from source code or pre-built images