[筆記] 建立 Redis 及 Redis Insight 使用 docker-compose


Posted by su321752a on 2022-09-03

平常開發時不會常常用到 redis ,而且筆電資源有限不會隨時開啟 redis 及 Redis Insight 容器。記在這邊隨時可以找到。
避免忘了關閉移除容器不要設定 restart:always

version: "3"
services:
  redis:
    container_name: redis
    image: redis:alpine
    ports:
      - 6379:6379
    deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 500M
  redisinsights:
    container_name: redisinsights
    image: redislabs/redisinsight:latest
    ports:
      - '8001:8001'

執行 docker-compose 指令

docker-compose up -d

拉 Image 可能需要一點時間,執行完畢會有 2 個容器。

接著打開 http://127.0.0.1:8001/

連線資訊如畫面所示。
最後停止並移除容器

docker-compose down

#docker #docker-compose #Redis







Related Posts

[RESOLVED] SQL With Keyword Error

[RESOLVED] SQL With Keyword Error

Scroll 相關運用 - 募資網站

Scroll 相關運用 - 募資網站

Web Component 實戰

Web Component 實戰


Comments