docs: review and update Compose support matrix

This commit is contained in:
Pasha Sviderski
2025-09-26 22:42:07 +10:00
parent 2969b40ad4
commit aebd2ac232
@@ -3,60 +3,60 @@
Uncloud supports a subset of the [Compose specification](https://compose-spec.io/) with some extensions and limitations. Uncloud supports a subset of the [Compose specification](https://compose-spec.io/) with some extensions and limitations.
The following table shows the support status for main Compose features: The following table shows the support status for main Compose features:
| Feature | Support Status | Notes | | Feature | Support Status | Notes |
| ------------------ | ------------------- | --------------------------------------------------- | |--------------------|--------------------|---------------------------------------------------------------------------------------|
| **Services** | | | | **Services** | | |
| `build` | ✅ Supported | Build context and Dockerfile | | `build` | ⚠️ Limited | Build context and Dockerfile |
| `command` | ✅ Supported | Override container command | | `command` | ✅ Supported | Override container command |
| `configs` | ✅ Supported | File-based and inline configs | | `configs` | ✅ Supported | File-based and inline configs |
| `cpus` | ✅ Supported | CPU limit | | `cpus` | ✅ Supported | CPU limit |
| `depends_on` | ❌ Not supported | Services start independently | | `depends_on` | ⚠️ Limited | Services deployed in order but conditions not checked |
| `dns` | ❌ Not supported | Built-in service discovery | | `dns` | ❌ Not supported | Built-in service discovery |
| `dns_search` | ❌ Not supported | Built-in service discovery | | `dns_search` | ❌ Not supported | Built-in service discovery |
| `entrypoint` | ✅ Supported | Override container entrypoint | | `entrypoint` | ✅ Supported | Override container entrypoint |
| `env_file` | ✅ Supported | Environment file | | `env_file` | ✅ Supported | Environment file |
| `environment` | ✅ Supported | Environment variables | | `environment` | ✅ Supported | Environment variables |
| `image` | ✅ Supported | Container image specification | | `image` | ✅ Supported | Container image specification |
| `init` | ✅ Supported | Run init process in container | | `init` | ✅ Supported | Run init process in container |
| `labels` | ❌ Not supported | Not currently needed | | `labels` | ❌ Not supported | |
| `links` | ❌ Not supported | Use service names for communication | | `links` | ❌ Not supported | Use service names for communication |
| `logging` | ✅ Supported | Uses Docker daemon logging | | `logging` | ✅ Supported | Defaults to [local](https://docs.docker.com/engine/logging/drivers/local/) log driver |
| `mem_limit` | ✅ Supported | Memory limit | | `mem_limit` | ✅ Supported | Memory limit |
| `mem_reservation` | ✅ Supported | Memory reservation | | `mem_reservation` | ✅ Supported | Memory reservation |
| `mem_swappiness` | ❌ Not supported | | | `mem_swappiness` | ❌ Not supported | |
| `memswap_limit` | ❌ Not supported | | | `memswap_limit` | ❌ Not supported | |
| `networks` | ❌ Not supported | All containers share cluster network | | `networks` | ❌ Not supported | All containers share cluster network |
| `ports` | ⚠️ Limited | Basic port publishing. Use `x-ports` for HTTP/HTTPS | | `ports` | ⚠️ Limited | `mode: host` only, use `x-ports` for HTTP/HTTPS |
| `privileged` | ✅ Supported | Run containers in privileged mode | | `privileged` | ✅ Supported | Run containers in privileged mode |
| `pull_policy` | ✅ Supported | always, missing, never | | `pull_policy` | ✅ Supported | `always`, `missing`, `never` |
| `secrets` | ❌ Not supported | Use configs or environment variables | | `secrets` | ❌ Not supported | Use configs or environment variables |
| `security_opt` | ❌ Not supported | | | `security_opt` | ❌ Not supported | |
| `storage_opt` | ❌ Not supported | | | `storage_opt` | ❌ Not supported | |
| `user` | ✅ Supported | Set container user | | `user` | ✅ Supported | Set container user |
| `volumes` | ✅ Supported | Named volumes, bind mounts, tmpfs | | `volumes` | ✅ Supported | Named volumes, bind mounts, tmpfs |
| **Deploy** | | | | **Deploy** | | |
| `labels` | ❌ Not supported | Not needed | | `labels` | ❌ Not supported | |
| `mode` | ⚠️ Limited | Only `replicated` supported | | `mode` | ✅ Supported | Either `global` or `replicated` |
| `placement` | ❌ Not supported | Use `x-machines` extension | | `placement` | ❌ Not supported | Use `x-machines` extension |
| `replicas` | ✅ Supported | Number of container replicas | | `replicas` | ✅ Supported | Number of container replicas |
| `resources` | ⚠️ Limited | CPU and memory limits only | | `resources` | ⚠️ Limited | CPU and memory limits only |
| `restart_policy` | ❌ Not supported | Services auto-restart | | `restart_policy` | ❌ Not supported | Defaults to `unless-stopped` |
| **Volumes** | | | | **Volumes** | | |
| Named volumes | ✅ Supported | Docker volumes | | Named volumes | ✅ Supported | Docker volumes |
| Bind mounts | ✅ Supported | Host path binding | | Bind mounts | ✅ Supported | Host path binding |
| Tmpfs mounts | ✅ Supported | In-memory filesystems | | Tmpfs mounts | ✅ Supported | In-memory filesystems |
| Volume labels | ✅ Supported | Custom labels | | Volume labels | ✅ Supported | Custom labels |
| External volumes | ⚠️ Limited | Must exist before deployment | | External volumes | ✅ Supported | Must exist before deployment |
| Volume drivers | ⚠️ Limited | Local driver only | | Volume drivers | ⚠️ Limited | Local driver only |
| **Configs** | | | | **Configs** | | |
| File-based configs | ✅ Supported | Read from file | | File-based configs | ✅ Supported | Read from file |
| Inline configs | ✅ Supported | Defined in compose file | | Inline configs | ✅ Supported | Defined in compose file |
| External configs | ❌ Not supported | Not supported | | External configs | ❌ Not supported | Not supported |
| Short syntax | ❌ Not supported | Use long syntax only | | Short syntax | ❌ Not supported | Use long syntax only |
| **Extensions** | | | | **Extensions** | | |
| `x-caddy` | ✅ Uncloud-specific | Custom Caddy configuration | | `x-caddy` | ✅ Uncloud-specific | Custom Caddy configuration |
| `x-machines` | ✅ Uncloud-specific | Machine placement constraints | | `x-machines` | ✅ Uncloud-specific | Machine placement constraints |
| `x-ports` | ✅ Uncloud-specific | HTTP/HTTPS port publishing | | `x-ports` | ✅ Uncloud-specific | Service port publishing |
### Legend ### Legend
@@ -64,13 +64,13 @@ The following table shows the support status for main Compose features:
- ⚠️ **Limited**: Partial support or with restrictions - ⚠️ **Limited**: Partial support or with restrictions
-**Not supported**: Feature is not (yet) available -**Not supported**: Feature is not (yet) available
## Uncloud Extensions ## Uncloud extensions
Uncloud provides several custom extensions to enhance the Compose experience: Uncloud provides several custom extensions to enhance the Compose experience:
### `x-ports` ### `x-ports`
Define HTTP/HTTPS endpoints for services: Expose HTTP/HTTPS service ports via the Caddy reverse proxy, or bind TCP/UDP ports directly to the host:
```yaml ```yaml
services: services:
@@ -79,11 +79,14 @@ services:
x-ports: x-ports:
- 80/https - 80/https
- example.com:80/https - example.com:80/https
- 8080:80/tcp@host
``` ```
See [Publishing services](../1-ingress/2-publishing-services.md) for more details.
### `x-caddy` ### `x-caddy`
Custom Caddy reverse proxy configuration: Custom Caddy reverse proxy configuration for a service:
```yaml ```yaml
services: services:
@@ -91,17 +94,24 @@ services:
image: nginx image: nginx
x-caddy: | x-caddy: |
example.com { example.com {
reverse_proxy {{ upstreams 80 }} reverse_proxy {{upstreams 80}}
} }
``` ```
See [Publishing services](../1-ingress/2-publishing-services.md) for more details.
### `x-machines` ### `x-machines`
Specify on what machines the service should run: Restrict which machines can run your service. If you deploy multiple replicas, Uncloud automatically spreads them across
the specified machines.
```yaml ```yaml
services: services:
web: web:
image: nginx image: nginx
x-machines: ["web-1", "web-2"] x-machines:
- machine-1
- machine-2
# Short syntax for a single machine
# x-machines: machine-1
``` ```