Skip to content

raymond-liao/redis-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis-docker-compose

A docker-compose sample to start Redis database.

How to use?

  1. Clone the project:
  $ git clone https://github.com/gaoshanyu/redis-docker-compose.git
  1. Start Redis via docker-compose in terminal:
  $ cd ./redis-docker-compose
  $ docker-compose up -d
  1. Connect to the Redis server:
  $ docker exec -ti redis redis-cli -h 127.0.0.1 -p 6379 -a 12345678
  1. Other commands maybe needed:
  # you can stop service by the command
  $ docker stop redis
  # you can start service by the command
  # maybe you need this command after your computer restart
  $ docker start redis
  # you can restart service by the command
  # maybe you need this command after you made some update for [redis.conf]
  $ docker restart redis

Q&A

  1. How to change password?
  • Just change the line requirepass 12345678 in file redis.conf to requirepass [new password], and then restart the service with command docker restart redis

About

A docker-compose sample to start redis database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published