fix(explorer): When to use host.docker.internal with InfluxDB 3.

- Revises guidance in install and get-started.
- Adds Explorer to project compose file for testing.
pull/6459/head
Jason Stirnaman 2025-10-10 15:30:27 -05:00
parent d5866d1737
commit da4f5e66a6
3 changed files with 40 additions and 5 deletions

View File

@ -369,6 +369,18 @@ services:
target: /var/lib/influxdb3/plugins/custom target: /var/lib/influxdb3/plugins/custom
secrets: secrets:
- influxdb3-enterprise-admin-token - influxdb3-enterprise-admin-token
influxdb3-explorer:
container_name: influxdb3-explorer
image: influxdata/influxdb3-ui:latest
pull_policy: always
ports:
- 8888:80
- 8889:8888
command:
- --mode=admin
profiles:
- explorer
- influxdb3
telegraf-pytest: telegraf-pytest:
container_name: telegraf-pytest container_name: telegraf-pytest
image: influxdata/docs-pytest image: influxdata/docs-pytest

View File

@ -36,9 +36,26 @@ InfluxDB 3 Explorer supports the following InfluxDB 3 products:
- **Server name**: A name to identify the InfluxDB 3 server you're connecting to. - **Server name**: A name to identify the InfluxDB 3 server you're connecting to.
- **Server URL**: The URL used to connect to your InfluxDB 3 server. - **Server URL**: The URL used to connect to your InfluxDB 3 server.
- The URL depends on how and where your InfluxDB 3 instance is running. See [When to use `host.docker.internal`](#when-to-use-hostdockerinternal) for more information.
- Select the protocol to use (http or https). - Select the protocol to use (http or https).
- Provide the host and, if necessary, the port. - Provide the host and, if necessary, the port.
- _If connecting to a local, non-Docker instance, use `host.docker.internal`._ For more information about host.docker.internal, see the [Docker documentation](https://docs.docker.com/desktop/features/networking).
> [!Note]
> #### When to use `host.docker.internal`
>
> If your InfluxDB 3 instance is running in Docker (not the same container as Explorer),
> use `host.docker.internal` as your server host to allow the Explorer container to
> connect to the InfluxDB container on the host--for example:
>
> ```txt
> "DEFAULT_INFLUX_SERVER": "http://host.docker.internal:8181"
> ```
>
> - If both Explorer and InfluxDB are in the same Docker network, use the container name instead.
> - If InfluxDB is running natively on your machine (not in Docker), use `localhost`.
>
> For more information, see the [Docker networking documentation](https://docs.docker.com/desktop/features/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host).
- **Token**: The authorization token to use to connect to your InfluxDB 3 server. - **Token**: The authorization token to use to connect to your InfluxDB 3 server.
We recommend using an InfluxDB 3 _admin_ token. We recommend using an InfluxDB 3 _admin_ token.
@ -122,7 +139,7 @@ The Results pane provides three view options:
> - Ensure that you query the `time` column > - Ensure that you query the `time` column
> - Update the query to include an `ORDER BY time` clause. > - Update the query to include an `ORDER BY time` clause.
Congratulations! You have successfully used {{% product-name %}} to connect to, You have successfully used {{% product-name %}} to connect to,
write data to, and query data from an InfluxDB 3 instance. write data to, and query data from an InfluxDB 3 instance.
## Video walkthrough ## Video walkthrough

View File

@ -240,14 +240,20 @@ Instead of configuring connections through the UI, you can pre-define connection
- **`DEFAULT_SERVER_NAME`**: a display name (only used by Explorer) for your [InfluxDB 3 Core](/influxdb3/core/get-started/setup/#start-influxdb) or [Enterprise](/influxdb3/enterprise/get-started/setup/#start-influxdb) server - **`DEFAULT_SERVER_NAME`**: a display name (only used by Explorer) for your [InfluxDB 3 Core](/influxdb3/core/get-started/setup/#start-influxdb) or [Enterprise](/influxdb3/enterprise/get-started/setup/#start-influxdb) server
> [!Note] > [!Note]
> If connecting to a local, _non-Docker_ instance, use `host.docker.internal` as your server host--for example: > #### When to use `host.docker.internal`
>
> If your InfluxDB 3 instance is running in Docker (not the same container as Explorer),
> use `host.docker.internal` as your server host to allow the Explorer container to
> connect to the InfluxDB container on the host--for example:
> >
> ```txt > ```txt
> "DEFAULT_INFLUX_SERVER": "http://host.docker.internal:8181" > "DEFAULT_INFLUX_SERVER": "http://host.docker.internal:8181"
> ``` > ```
> >
> `host.docker.internal` allows the Docker container to connect to services running on your host machine. > - If both Explorer and InfluxDB are in the same Docker network, use the container name instead.
> For more information, see the [Docker documentation](https://docs.docker.com/desktop/features/networking). > - If InfluxDB is running natively on your machine (not in Docker), use `localhost`.
>
> For more information, see the [Docker networking documentation](https://docs.docker.com/desktop/features/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host).
2. **Mount the configuration directory:** 2. **Mount the configuration directory:**