docs: add documentation for label management

This commit is contained in:
Jose Diaz-Gonzalez committed 2025-11-16 16:49:03 -05:00
1 parent 003f6a5bd8
commit 3a52c7d0a8
4 files changed
+193 -1

No files matched your search

+48
View File
@@ -124,6 +124,54 @@ The following folders within an app repository may have `*.conf` files that will
- `openresty/http-includes/`: Injected in the `server` block serving http(s) requests for the app.
- `openresty/http-location-includes/`: Injected in the `location` block that proxies to the app in the app's respective `server` block.
### Label Management
The OpenResty plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure OpenResty behavior beyond what the plugin provides by default.
Refer to the upstream [openresty-docker-proxy](https://github.com/dokku/openresty-docker-proxy) documentation for more information on what labels are available.
#### Adding a label
To add a custom container label to an app, use the `openresty:label:add` command:
```shell
dokku openresty:label:add node-js-app openresty.directive value
```
This will add the label `openresty.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Removing a label
To remove a custom container label from an app, use the `openresty:label:remove` command:
```shell
dokku openresty:label:remove node-js-app openresty.directive
```
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Showing labels
To view all custom container labels for an app, use the `openresty:label:show` command:
```shell
dokku openresty:label:show node-js-app
```
To view a specific label value, provide the label name:
```shell
dokku openresty:label:show node-js-app openresty.directive
```
### SSL Configuration
The OpenResty plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.