Skip to content

Commit d119c72

Browse files
Merge pull request #244172 from PatAltimore/patricka-anca-patch-6
Add expose port for API proxy
2 parents 44f4e10 + 95ed264 commit d119c72

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

articles/iot-edge/how-to-configure-api-proxy-module.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Configure API proxy module - Azure IoT Edge | Microsoft Docs
2+
title: Configure API proxy module for Azure IoT Edge
33
description: Learn how to customize the API proxy module for IoT Edge gateway hierarchies.
44
author: PatAltimore
55

66
ms.author: patricka
7-
ms.date: 01/05/2023
7+
ms.date: 07/06/2023
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -50,7 +50,7 @@ Currently, the default environment variables include:
5050
| -------------------- | ----------- |
5151
| `PROXY_CONFIG_ENV_VAR_LIST` | List all the variables that you intend to update in a comma-separated list. This step prevents accidentally modifying the wrong configuration settings.
5252
| `NGINX_DEFAULT_TLS` | Specifies the list of TLS protocol(s) to be enabled. See NGINX's [ssl_protocols](https://nginx.org/docs/http/ngx_http_ssl_module.html#ssl_protocols).<br><br>Default is 'TLSv1.2'. |
53-
| `NGINX_DEFAULT_PORT` | Changes the port that the nginx proxy listens to. If you update this environment variable, make sure the port you select is also exposed in the module dockerfile and declared as a port binding in the deployment manifest.<br><br>Default is 443.<br><br>When deployed from the Azure Marketplace, the default port is updated to 8000, to prevent conflicts with the edgeHub module. For more information, see [Minimize open ports](#minimize-open-ports). |
53+
| `NGINX_DEFAULT_PORT` | Changes the port that the nginx proxy listens to. If you update this environment variable, you must expose the port in the module dockerfile and declare the port binding in the deployment manifest. For more information, see [Expose proxy port](#expose-proxy-port).<br><br>Default is 443.<br><br>When deployed from the Azure Marketplace, the default port is updated to 8000, to prevent conflicts with the edgeHub module. For more information, see [Minimize open ports](#minimize-open-ports). |
5454
| `DOCKER_REQUEST_ROUTE_ADDRESS` | Address to route docker requests. Modify this variable on the top layer device to point to the registry module.<br><br>Default is the parent hostname. |
5555
| `BLOB_UPLOAD_ROUTE_ADDRESS` | Address to route blob registry requests. Modify this variable on the top layer device to point to the blob storage module.<br><br>Default is the parent hostname. |
5656

@@ -164,6 +164,27 @@ Configure the following module on any **lower layer** for this scenario:
164164
}
165165
```
166166

167+
## Expose proxy port
168+
169+
Port 8000 is exposed by default from the docker image. If a different nginx proxy port is used, add the **ExposedPorts** section declaring the port in the deployment manifest. For example, if you change the nginx proxy port to 8001, add the following to the deployment manifest:
170+
171+
```
172+
{
173+
"ExposedPorts": {
174+
"8001/tcp": {}
175+
},
176+
"HostConfig": {
177+
"PortBindings": {
178+
"8001/tcp": [
179+
{
180+
"HostPort": "8001"
181+
}
182+
]
183+
}
184+
}
185+
}
186+
```
187+
167188
## Enable blob upload
168189
169190
Another use case for the API proxy module is to enable IoT Edge devices in lower layers to upload blobs. This use case enables troubleshooting functionality on lower layer devices like uploading module logs or uploading the support bundle.

0 commit comments

Comments
 (0)