Last active
August 25, 2023 21:01
-
-
Save rlaace423/48870f8a5714d2ed1ad46eb38a5662df to your computer and use it in GitHub Desktop.
redis docker 설정
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
very_strong_password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
redis: | |
image: arm64v8/redis:6.2 # 이미지 버전 확인 필요! | |
restart: always | |
container_name: redis | |
ports: | |
- "6379:6379" | |
networks: | |
- redis | |
environment: | |
- REDIS_PASSWORD_FILE=/run/secrets/redis_password | |
volumes: | |
- type: bind | |
source: $HOME/redis/data | |
target: /data | |
- type: bind | |
source: $HOME/redis/redis.conf | |
target: /usr/local/etc/redis/redis.conf | |
secrets: | |
- redis_password | |
command: [ | |
"bash", | |
"-c", | |
'docker-entrypoint.sh --requirepass "$$(cat $$REDIS_PASSWORD_FILE)"' | |
] | |
networks: | |
redis: | |
name: redis | |
driver: bridge | |
secrets: | |
redis_password: | |
file: .redis_password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind 0.0.0.0 | |
port 6379 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/redis/ | |
data/ | |
.redis_password | |
docker-compose.yml | |
redis.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment