• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

? Set Up Redis with RedisInsight Using Docker for Local Development

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
? Set Up Redis with RedisInsight Using Docker for Local Development


Redis is a high-performance in-memory data store, widely used for caching, pub/sub, queues, and more. When working locally, inspecting what’s happening inside Redis can be difficult without a user-friendly UI.

That’s where RedisInsight comes in — an official Redis GUI that helps you visualize and manage your Redis instance.

In this tutorial, we’ll use Docker Compose to spin up a Redis container and a RedisInsight UI side-by-side for your local development setup.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



✅ Prerequisites


Make sure you have the following tools installed:

  • Docker
  • Docker Compose

These work across Linux, macOS, and Windows.

? Step-by-Step Setup

? Step 1: Create a project directory



Open your terminal and run:


mkdir redis-docker-setup
cd redis-docker-setup
? Step 2: Create the docker-compose.yml file


Now, inside this folder, create a file named docker-compose.yml and paste the following content:


services:
#redis
redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- redis-network
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
#redis-insight
redis-insight:
image: redis/redisinsight:latest
container_name: redis-insight
restart: unless-stopped
ports:
- "5540:5540"
volumes:
- redis-insight-data:/data
networks:
- redis-network
depends_on:
- redis

volumes:
redis-data:
driver: local
redis-insight-data:
driver: local
networks:
redis-network:
driver: bridge
? Step 3: Run the containers


In your terminal, execute:


docker compose up -d

Docker will pull the latest Redis and RedisInsight images and start both containers.

✅ Step 4: Open RedisInsight in your browser


Once the containers are running, navigate to:



Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Check the recommended settings and also check the terms & conditions switch, and then hit the “Submit” button.

RedisInsight will launch in your browser. It may ask you to add a Redis database. Just enter and then hit Add Database:

  • Host: redis
  • Port: 6379


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



RedisInsight will connect to your Redis instance running in Docker.

? More: Redis Persistence


We’ve enabled persistence in Redis using:


command: \["redis-server", "--appendonly", "yes"\]

This ensures that Redis data is stored on disk (in the redis-data volume), not just in-memory, which is perfect for dev environments where data loss during restarts is a concern.

? Step 5: Tear down the containers (optional)


To stop and remove the containers and associated volumes:


docker compose down
? Conclusion


GitHub Link:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Youtube:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Using Docker Compose, you can set up a complete Redis stack with RedisInsight in seconds — no local installation, no config headaches. This is ideal for developers working with caching layers, pub/sub systems, or simply learning Redis.

If you found this article helpful, feel free to bookmark it or share it with your team!

Would you like a similar setup tutorial for RabbitMQ, MongoDB Compass, or PostgreSQL with Adminer? Let me know!


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу