Skip to content

Commit 93076b3

Browse files
sandersonCopilot
andauthored
Update and add explorer environment variable information (#6170)
* update and add explorer env var info * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 51e75e2 commit 93076b3

File tree

1 file changed

+96
-7
lines changed

1 file changed

+96
-7
lines changed

content/influxdb3/explorer/install.md

Lines changed: 96 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ Use [Docker](https://docker.com) to install and run **InfluxDB 3 Explorer**.
7373
- `$(pwd)/db:/db:rw`
7474
- `$(pwd)/config:/app-root/config:ro`
7575
- `$(pwd)/ssl:/etc/nginx/ssl:ro`
76-
- Any of the available [environment variables](#environment-variables)
76+
- Any of the available [environment variables](#environment-variables)
77+
78+
> [!Note]
79+
> To persist sessions across container restarts, see the detailed instructions
80+
> on setting the [`SESSION_SECRET_KEY` environment variable](#session_secret_key).
7781

7882
```bash
7983
docker run --detach \
@@ -114,6 +118,13 @@ To enable TLS/SSL, mount valid certificate and key files into the container:
114118
The nginx web server automatically uses certificate files when they are present
115119
in the mounted path.
116120

121+
> [!Note]
122+
> You can use a custom location for certificate and key files.
123+
> Use the [`SSL_CERT_PATH`](#ssl_cert_path) and [`SSL_KEY_PATH`](#ssl_key_path)
124+
> environment variables to identify the custom location.
125+
> Also update the SSL directory volume mount path inside the container.
126+
127+
117128
---
118129

119130
## Pre-configure InfluxDB connection settings
@@ -191,11 +202,91 @@ If `--mode` is not set, the container defaults to query mode.
191202
Use the following environment variables to customize {{% product-name %}} settings
192203
in your container.
193204

194-
| Variable | Description | Default |
195-
|----------------|--------------------------------------------------|----------------------|
196-
| `DATABASE_URL` | Path to SQLite DB inside container | `/db/sqlite.db` |
205+
- [DATABASE_URL](#database_url)
206+
- [SESSION_SECRET_KEY](#session_secret_key)
207+
- [SSL_CERT_PATH](#ssl_cert_path)
208+
- [SSL_KEY_PATH](#ssl_key_path)
197209

198-
---
210+
### DATABASE_URL
211+
212+
Path to SQLite DB inside container. The default is `/db/sqlite.db`.
213+
214+
{{< expand-wrapper >}}
215+
{{% expand "View `DATABASE_URL` example" %}}
216+
<!-- pytest.mark.skip -->
217+
218+
```bash
219+
docker run --detach \
220+
# ...
221+
--volume $(pwd)/db:/custom/db-path:rw \
222+
--env DATABASE_URL=/custom/db-path/sqlite.db \
223+
quay.io/influxdb/influxdb3-explorer:latest
224+
```
225+
{{% /expand %}}
226+
{{< /expand-wrapper >}}
227+
228+
### SESSION_SECRET_KEY
229+
230+
Specifies the secret key for session management. If none is provided, Explorer
231+
uses a random 32-byte hex string as the session secret key.
232+
233+
{{< expand-wrapper >}}
234+
{{% expand "View `SESSION_SECRET_KEY` example" %}}
235+
<!-- pytest.mark.skip -->
236+
237+
```bash
238+
docker run --detach \
239+
# ...
240+
--env SESSION_SECRET_KEY=xxX0Xx000xX0XxxxX0Xx000xX0XxX00x \
241+
quay.io/influxdb/influxdb3-explorer:latest
242+
```
243+
{{% /expand %}}
244+
{{< /expand-wrapper >}}
245+
246+
> [!Important]
247+
> #### Always set SESSION_SECRET_KEY in production
248+
>
249+
> When you restart the container, {{% product-name %}} generates a new key if
250+
> not explicitly set. For production use cases, always set the `SESSION_SECRET_KEY`
251+
> environment variable to persist sessions across restarts.
252+
253+
### SSL_CERT_PATH
254+
255+
Defines the path to the SSL certificate file inside the container.
256+
Default is `/etc/nginx/ssl/cert.pem`.
257+
258+
{{< expand-wrapper >}}
259+
{{% expand "View `SSL_CERT_PATH` example" %}}
260+
<!-- pytest.mark.skip -->
261+
262+
```bash
263+
docker run --detach \
264+
# ...
265+
--volume $(pwd)/ssl:/custom/ssl:ro \
266+
--env SSL_CERT_PATH=/custom/ssl/cert.pem \
267+
quay.io/influxdb/influxdb3-explorer:latest
268+
```
269+
{{% /expand %}}
270+
{{< /expand-wrapper >}}
271+
272+
### SSL_KEY_PATH
273+
274+
Defines the path to the SSL private key file inside the container.
275+
Default is `/etc/nginx/ssl/key.pem`.
276+
277+
{{< expand-wrapper >}}
278+
{{% expand "View `SSL_KEY_PATH` example" %}}
279+
<!-- pytest.mark.skip -->
280+
281+
```bash
282+
docker run --detach \
283+
# ...
284+
--volume $(pwd)/ssl:/custom/ssl:ro \
285+
--env SSL_KEY_PATH=/custom/ssl/key.pem \
286+
quay.io/influxdb/influxdb3-explorer:latest
287+
```
288+
{{% /expand %}}
289+
{{< /expand-wrapper >}}
199290

200291
## Volume Reference
201292

@@ -205,8 +296,6 @@ in your container.
205296
| `/app-root/config` | JSON config for defaults | `./config` |
206297
| `/etc/nginx/ssl` | SSL certs for HTTPS | `./ssl` |
207298

208-
---
209-
210299
## Exposed Ports
211300

212301
| Port | Protocol | Purpose |

0 commit comments

Comments
 (0)