Skip to content

Instantly share code, notes, and snippets.

@realamirhe
Created April 30, 2021 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realamirhe/e9906a6349f8c57a4351287ef5492f39 to your computer and use it in GitHub Desktop.
Save realamirhe/e9906a6349f8c57a4351287ef5492f39 to your computer and use it in GitHub Desktop.
configuring redis docker-compose.yml file using password from .env file
# redis
REDIS_PORT=6379
REDIS_PASSWORD=pass1234
version: '3'
services:
redis:
image: redis
environment:
- REDIS_PASSWORD
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- 6379:6379
volumes:
- redis-db:/data
volumes:
redis-db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment