mirror of
https://github.com/dokku/dokku.git
synced 2025-12-16 03:57:43 +01:00
Merge pull request #8151 from dokku/7204-service-process-types
Allow exposing non-web processes as kubernetes services
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
- `autoscaling` (map of string to object, optional) autoscaling rules. See the autoscaling section for more details
|
||||
- `max_parallel`: (int, optional) number of instances to deploy in parallel at a given time
|
||||
- `quantity`: (int, optional) number of processes to maintain. Default 1 for web processes, 0 for all others.
|
||||
- `service`: (map of string to oject, optional) governs how non-web processes are exposed as services on the network
|
||||
|
||||
### Autoscaling
|
||||
|
||||
@@ -82,6 +83,24 @@ An autoscaling trigger consists of the following properties:
|
||||
- `type`: (string, optional)
|
||||
- `metadata`: (object, optional)
|
||||
|
||||
### Service
|
||||
|
||||
```json
|
||||
{
|
||||
"formation": {
|
||||
"internal-web": {
|
||||
"service": {
|
||||
"exposed": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
(object, optional) A key-value object specifying how to expose non-web processes as services.
|
||||
|
||||
- `service`: (boolean, optional) Whether to expose a process as a network service. The `PORT` variable will be set to 5000.
|
||||
|
||||
## Healthchecks
|
||||
|
||||
```json
|
||||
|
||||
@@ -232,6 +232,27 @@ The global default value may be set by passing an empty value for the option.
|
||||
dokku scheduler-k3s:set --global deploy-timeout
|
||||
```
|
||||
|
||||
### Exposing services on the network
|
||||
|
||||
Dokku will automatically expose the `web` process as a Kubernetes Service, with all others being treated as background processes. In some cases, it may be useful to have other processes exposed as Kubernetes Service objects so as to segregate internal http endpoints from public http endpoints. This can be done by modifying the `app.json` Formation entry for your process type.
|
||||
|
||||
```json
|
||||
{
|
||||
"formation": {
|
||||
"internal-web": {
|
||||
"service": {
|
||||
"exposed": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In the above example, the `internal-web` process is exposed as a service. The `PORT` variable for the process will be set to `5000`, and a kubernetes `Service` object will be created pointing at your processes.
|
||||
|
||||
> [!NOTE]
|
||||
> It is not possible to modify the port mapping, nor is it possible to assign domains or SSL to a non-web process.
|
||||
|
||||
### SSL Certificates
|
||||
|
||||
#### Enabling letsencrypt integration
|
||||
|
||||
Reference in New Issue
Block a user