alnoda-workspaces/workspaces/redis-workspace/README.md

83 lines
3.2 KiB
Markdown
Raw Normal View History

2022-02-02 05:20:55 +13:00
<p align="center">
<img src="https://github.com/bluxmit/alnoda-workspaces/blob/main/img/Alnoda-white.svg" alt="Alnoda logo" width="150">
</p>
2022-01-12 05:02:43 +13:00
2022-02-02 05:20:55 +13:00
# Redis workspace
2022-02-02 05:50:36 +13:00
Docker image with Redis, Redis Commander and other Redis CLI tools. Can be used to manage cloud Redis deployments,
or as Redis docker image with batteries included for local development.
2022-01-12 05:02:43 +13:00
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/redis-wid-collage.png" alt="Collage">
</p>
```
2022-01-12 05:12:56 +13:00
docker run --name rwid-1 -d -p 8020-8035:8020-8035 alnoda/redis-workspace
2022-01-12 05:02:43 +13:00
```
open your browser on [http://localhost:8020](http://localhost:8020)
## Why
Substitute in your development `docker-compose.yaml` file standard redis image with this one, add port-mapping `-p 8020-8035:8020-8035`.
Now in addition to Redis, you've got a whole set of tools with UIs, that allow you to explore you Redis database, get and set keys, import datasets,
install Redis modules and more.
__List of tools__
2022-01-12 05:05:07 +13:00
- [Eclipse Theia](https://theia-ide.org/docs/)
2022-01-12 05:02:43 +13:00
- [Redis extension for VS-Code](https://open-vsx.org/extension/cweijan/vscode-redis-client)
- [Iredis](https://github.com/laixintao/iredis)
- [Redis-dump](https://github.com/yannh/redis-dump-go)
- [Redis-Tui](https://github.com/mylxsw/redis-tui)
- [Redis-commander](https://github.com/joeferner/redis-commander#readme)
in addition - [the common workspace-in-docker toolset](https://github.com/bluxmit/alnoda-workspaces/tree/main/workspaces/workspace-in-docker).
### Get started
Open workspace UI [http://localhost:800/](http://localhost:8020/) for quick access to all the tools
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/Redis-wid.png" alt="Redis WID" width="750">
</p>
Use workspace terminal [http://localhost:8026/](http://localhost:8026/) and load some Redis datasets
```
git clone https://github.com/redis-developer/redis-datasets.git /home/project/redis-datasets
cat /home/project/redis-datasets/movie-database/import_actors.redis | redis-cli
cat /home/project/redis-datasets/movie-database/import_movies.redis | redis-cli
```
2022-01-14 07:02:08 +13:00
Open Redis Commander UI on [http://localhost:8029/](http://localhost:8029/) and explore Redis databases
2022-01-12 05:02:43 +13:00
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/Rediscommander.png" alt="Redis commander" width="750">
</p>
Alternatively use browser-based VS-code [http://localhost:8025/](http://localhost:8025/) with Redis extension
2022-01-12 05:02:43 +13:00
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/Theia-redis.png" alt="Theia" width="750">
</p>
In the Workspace terminal launch iredis CLI, get & set keys
```
iredis
iredis --newbie
```
<p align="center">
2022-01-12 05:05:07 +13:00
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/iredis.png" alt="Iredis" width="400">
2022-01-12 05:02:43 +13:00
</p>
Create dump of the Redis database
```
redis-dump-go -h localhost > /home/redis-movie-dump.resp
```
Use File Browser [http://localhost:8021](http://localhost:8021) to get the dump to your PC