<commit_before>---
title: Configure the layer 7 routing service
description: Learn about Interlock, an application routing and load balancing system
  for Docker Swarm.
keywords: ucp, interlock, load balancing
ui_tabs:
- version: ucp-3.0
  orhigher: false
---

{% if include.version=="ucp-3.0" %}

[When enabling the layer 7 routing solution](index.md) from the UCP web UI,
you can configure the ports for incoming traffic. If you want to further
customize the layer 7 routing solution, you can do it by updating the
`ucp-interlock` service with a new Docker configuration object.

Here's how it works:

1. Find out what configuration is currently being used for the `ucp-interlock`
service and save it to a file:

{% raw %}
```bash
CURRENT_CONFIG_NAME=$(docker service inspect --format '{{ (index .Spec.TaskTemplate.ContainerSpec.Configs 0).ConfigName }}' ucp-interlock)
docker config inspect --format '{{ printf "%s" .Spec.Data }}' $CURRENT_CONFIG_NAME > config.toml
```
{% endraw %}

2. Make the necessary changes to the `config.toml` file.
[Learn about the configuration options available](configuration-reference.md).
3. Create a new Docker configuration object from the file you've edited:

```
NEW_CONFIG_NAME="com.docker.ucp.interlock.conf-$(( $(cut -d '-' -f 2 <<< "$CURRENT_CONFIG_NAME") + 1 ))"
docker config create $NEW_CONFIG_NAME config.toml
```

3. Update the `ucp-interlock` service to start using the new configuration:

```
docker service update \
  --config-rm $CURRENT_CONFIG_NAME \
  --config-add source=$NEW_CONFIG_NAME,target=/config.toml \
  --stop-signal SIGQUIT \
  --stop-grace-period 5s \
  ucp-interlock
```

By default the `ucp-interlock` service is configured to pause if something
goes wrong with the configuration update. The service won't do any updates
without manual intervention.

If you want the service to automatically rollback to a previous stable
configuration, you can update the service with:

```
docker service update \
  --update-failure-action rollback \
  ucp-interlock
```

{% endif %}<commit_msg>Remove stop signal from Interlock docs<commit_after>---
title: Configure the layer 7 routing service
description: Learn about Interlock, an application routing and load balancing system
  for Docker Swarm.
keywords: ucp, interlock, load balancing
ui_tabs:
- version: ucp-3.0
  orhigher: false
---

{% if include.version=="ucp-3.0" %}

[When enabling the layer 7 routing solution](index.md) from the UCP web UI,
you can configure the ports for incoming traffic. If you want to further
customize the layer 7 routing solution, you can do it by updating the
`ucp-interlock` service with a new Docker configuration object.

Here's how it works:

1. Find out what configuration is currently being used for the `ucp-interlock`
service and save it to a file:

{% raw %}
```bash
CURRENT_CONFIG_NAME=$(docker service inspect --format '{{ (index .Spec.TaskTemplate.ContainerSpec.Configs 0).ConfigName }}' ucp-interlock)
docker config inspect --format '{{ printf "%s" .Spec.Data }}' $CURRENT_CONFIG_NAME > config.toml
```
{% endraw %}

2. Make the necessary changes to the `config.toml` file.
[Learn about the configuration options available](configuration-reference.md).
3. Create a new Docker configuration object from the file you've edited:

```
NEW_CONFIG_NAME="com.docker.ucp.interlock.conf-$(( $(cut -d '-' -f 2 <<< "$CURRENT_CONFIG_NAME") + 1 ))"
docker config create $NEW_CONFIG_NAME config.toml
```

3. Update the `ucp-interlock` service to start using the new configuration:

```
docker service update \
  --config-rm $CURRENT_CONFIG_NAME \
  --config-add source=$NEW_CONFIG_NAME,target=/config.toml \
  ucp-interlock
```

By default the `ucp-interlock` service is configured to pause if something
goes wrong with the configuration update. The service won't do any updates
without manual intervention.

If you want the service to automatically rollback to a previous stable
configuration, you can update the service with:

```
docker service update \
  --update-failure-action rollback \
  ucp-interlock
```

{% endif %}
{'fraction_non_alphanumeric': 0.10354156419085096, 'fraction_numerical': 0.007132316773241515, 'mean_word_length': 4.429906542056075, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6702193', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1152, 'n_words': 475}