Advertisement
Guest User

Untitled

a guest
May 9th, 2020
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. 1. docker-compose.yaml:
  2. services:
  3. redis-1:
  4. build: ./redis-server
  5. volumes:
  6. - ./redis-server/conf/dev.conf:/usr/local/etc/redis/redis.conf
  7.  
  8. redis-2:
  9. build: ./redis-server
  10. volumes:
  11. - ./redis-server/conf/dev.conf:/usr/local/etc/redis/redis.conf
  12.  
  13. redis-3:
  14. build: ./redis-server
  15. volumes:
  16. - ./redis-cluster/redis/conf/dev.conf:/usr/local/etc/redis/redis.conf
  17.  
  18. sentinel-1:
  19. build: ./redis-sentinel
  20. volumes:
  21. - ./redis-sentinel/conf:/bitnami/redis-sentinel/conf
  22. ports:
  23. - "26379:26379"
  24.  
  25. sentinel-2:
  26. build: ./redis-sentinel
  27. volumes:
  28. - ./redis-sentinel/conf:/bitnami/redis-sentinel/conf
  29. ports:
  30. - "26380:26379"
  31.  
  32. sentinel-3:
  33. build: ./redis-sentinel
  34. volumes:
  35. - ./redis-sentinel/conf:/bitnami/redis-sentinel/conf
  36. ports:
  37. - "26381:26379"
  38.  
  39. networks:
  40. default:
  41. name: redis_cluster
  42. 2. Tree
  43. .
  44. ├── dev-rm.sh
  45. ├── dev-start.sh
  46. ├── docker-compose.yaml
  47. ├── prod-rm.sh
  48. ├── prod-start.sh
  49. ├── redis-sentinel
  50. │ ├── conf
  51. │ │ └── dev.conf
  52. │ └── Dockerfile
  53. └── redis-server
  54. ├── conf
  55. │ ├── dev.conf
  56. │ └── prod.conf
  57. └── Dockerfile
  58.  
  59. 4 directories, 10 files
  60.  
  61. 3. Sentinel Dockerfile
  62. # syntax=docker/dockerfile:latest
  63.  
  64. FROM bitnami/redis-sentinel
  65.  
  66. EXPOSE 6973/tcp
  67. ENTRYPOINT redis-sentinel
  68.  
  69. 4. Result
  70. # docker-compose run sentinel-1
  71. 6:X 09 May 2020 14:12:42.720 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
  72. 6:X 09 May 2020 14:12:42.720 # Redis version=6.0.1, bits=64, commit=00000000, modified=0, pid=6, just started
  73. 6:X 09 May 2020 14:12:42.720 # Warning: no config file specified, using the default config. In order to specify a config file use redis-sentinel /path/to/sentinel.conf
  74. _._
  75. _.-``__ ''-._
  76. _.-`` `. `_. ''-._ Redis 6.0.1 (00000000/0) 64 bit
  77. .-`` .-```. ```\/ _.,_ ''-._
  78. ( ' , .-` | `, ) Running in sentinel mode
  79. |`-._`-...-` __...-.``-._|'` _.-'| Port: 26379
  80. | `-._ `._ / _.-' | PID: 6
  81. `-._ `-._ `-./ _.-' _.-'
  82. |`-._`-._ `-.__.-' _.-'_.-'|
  83. | `-._`-._ _.-'_.-' | http://redis.io
  84. `-._ `-._`-.__.-'_.-' _.-'
  85. |`-._`-._ `-.__.-' _.-'_.-'|
  86. | `-._`-._ _.-'_.-' |
  87. `-._ `-._`-.__.-'_.-' _.-'
  88. `-._ `-.__.-' _.-'
  89. `-._ _.-'
  90. `-.__.-'
  91.  
  92. 6:X 09 May 2020 14:12:42.725 # Sentinel started without a config file. Exiting...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement