Skip to content

Instantly share code, notes, and snippets.

@imran-vz
Created June 17, 2022 08:47
Show Gist options
  • Save imran-vz/03ee1d9fe9f51930e238c328e6455e3e to your computer and use it in GitHub Desktop.
Save imran-vz/03ee1d9fe9f51930e238c328e6455e3e to your computer and use it in GitHub Desktop.
Use Redis with docker-compose.
version: '3.8'
services:
redis:
image: redis:7.0.2-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass <PASS>
volumes:
- cache:/data
volumes:
cache:
driver: local
@imran-vz
Copy link
Author

Use this docker-compose.yml file to use Redis locally or anywhere else without actually installing it in your system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment