LoginSignup
16
15

More than 5 years have passed since last update.

docker-compose で Redis連携

Posted at

Append-only fileで永続化設定

docker-compose.yml
version: '2'

services:

  redis:
    image: redis:3.2.9
    ports:
      - "6379:6379"
    command: redis-server --appendonly yes --requirepass foobared
    volumes:
       - redis-data:/data

  volumes:
    redis-data:
      driver: local

■ ポイント
・appendonly yes
  参照 Append-only file

・requirepass foobared
  参照 docker-compose example
  任意のパスワード指定 ex) foobared

・volumesで永続化

16
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
15