Skip to content

Commit

Permalink
adding description for RedisInsight on Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktarStarastsenka authored Dec 11, 2023
1 parent 7f34361 commit f9df4d7
Show file tree
Hide file tree
Showing 4 changed files with 406 additions and 2 deletions.
37 changes: 37 additions & 0 deletions docs/install/install-redisinsight/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
Title: Configure RedisInsight
date: 2024-01-15 10:00:00
weight: 60
categories: ["RI"]
path: install/install-redisinsight/configuration
altTag: Configure RedisInsight
---
You can configure RedisInsight with system environment variables.

To configure RedisInsight with environment variables:

1. Set environment variables for your operating system:

- [Mac](https://apple.stackexchange.com/a/106814)
- [Windows](https://support.microsoft.com/en-au/topic/how-to-manage-environment-variables-in-windows-xp-5bf6725b-655e-151c-0b55-9a8c9c7f747d)
- [Linux](https://askubuntu.com/a/58828)
- [Docker](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file)

1. Set the environment variables.
1. Restart RedisInsight.

## RedisInsight environment variables

The following environment variables can be set to configure RedisInsight:

| Environment variable | Description | Type | Default |
| --- | --- | --- | --- |
| RI_APP_PORT | Port which RedisInsight should listen to. | Number | `8001` |
| RI_APP_HOST | Host which RedisInsight should listen to. | String | `"0.0.0.0"` on Docker and `"127.0.0.1"` on Windows, Mac, and Linux. |
| RI_HOME_DIR | Sets the storage directory where RedisInsight stores application data (such as local databases, logs, and snapshot files). | String | `"~/.redisinsight"` on desktop, `"/db"` on docker. |
| RILOGDIR | Sets the logging storage directory where RedisInsight stores application logs. | String | "~/.redisinsight" on desktop, "/db" on docker. |
| RI_LOG_LEVEL | Configures the log level of the application. Possible values are - `"DEBUG"`, `"INFO"`, `"WARNING"`, `"ERROR`" and `"CRITICAL"`. | String | `"WARNING"` |
| RI_TRUSTED_ORIGINS | Configures the trusted origins of the application. | String | `""` |
| RI_PROXY_ENABLE | Enables Subpath Proxy for the application. | Boolean | `False` |
| RI_PROXY_PATH | Configures Subpath Proxy path for the application. Examples: `"/redisinsight"`, `"/myapp"` | String | `""` |
| RI_PROXY_PREFIX | Sets the Subpath proxy prefix HTTP header field name for the application. The application uses the value from this HTTP header key as proxy subpath. | String | `"X-Forwarded-Prefix"` |
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
Title: Install RedisInsight on AWS EC2
date: 2023-01-15 10:00:00 +0530
date: 2024-01-15 10:00:00
weight: 50
categories: ["RI"]
path: install-redisinsight/install-on-aws/
path: install/install-redisinsight/install-on-aws/
altTag: Install RedisInsight on AWS EC2
---
This tutorial shows how to install RedisInsight on an AWS EC2 instance and manage ElastiCache Redis instances using RedisInsight. To complete this tutorial you must have access to the AWS Console and permissions to launch EC2 instances.
Expand Down
53 changes: 53 additions & 0 deletions docs/install/install-redisinsight/install-on-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
Title: Install RedisInsight on Docker
date: 2024-01-15 10:00:00
weight: 30
categories: ["RI"]
path: install/install-redisinsight/install-on-docker/
altTag: Install RedisInsight on Docker
---
This tutorial shows how to install RedisInsight on [Docker](https://www.docker.com/) so you can use RedisInsight in development.
See a separate guide for installing [RedisInsight on AWS]({{< relref "/docs/install/install-on-aws.md" >}}).

## Install Docker

The first step is to [install Docker for your operating system](https://docs.docker.com/install/).

## Run RedisInsight Docker image

Next, run the RedisInsight container.

```bash
{docker run -v redisinsight:/db -p 8001:8001 redis/redisinsight:latest}
```

Then, point your browser to [http://localhost:8001](http://localhost:8001).

RedisInsight also provides a health check endpoint at [http://localhost:8001/healthcheck/](http://localhost:8001/healthcheck/) to monitor the health of the running container.

If everything worked, you should see the following output in the terminal:

```
Starting webserver...
Visit http://0.0.0.0:8001 in your web browser.
Press CTRL-C to exit.
```

### Resolving permission errors

If the previous command returns a permissions error, ensure the directory you pass as a volume to the container has necessary permissions for the container to access it. Run the following command:

```bash
{chown -R 1001 redisinsight}
```

### Adding flags to the run command

You can use additional flags with the `docker run` command:

1. You can add the `-it` flag to see the logs and view the progress.
1. On Linux, you can add `--network host`. This makes it easy to work with redis running on your local machine.
1. To analyze RDB files stored in S3, you can add the access key and secret access key as environment variables using the `-e` flag.

For example: `-e AWS_ACCESS_KEY=<aws access key> -e AWS_SECRET_KEY=<aws secret access key>`

Loading

0 comments on commit f9df4d7

Please sign in to comment.