mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 22:34:01 -05:00
Added redis data volume to compose setup (#21906)
ref https://linear.app/ghost/issue/ENG-1956/redis-creates-new-anonymous-volume-each-time-it-boots - Before this commit, the redis service in our docker compose setup would create a new anonymous volume each time it boots, with a non-descriptive, hash-based name. Over time these volumes accumulate and become a pain to clean up, and it's not immediately obvious what they are used for. - This commit adds a persistent data volume for redis data, so it will reuse the same volume, with a more descriptive title each time it boots. This eliminates the annoying anonymous volumes, and also gives us data persistence across boots for the redis service (which can be easily cleared by deleting the volume).
This commit is contained in:
parent
cabee005f4
commit
d275395c1f
2 changed files with 4 additions and 0 deletions
|
@ -35,3 +35,4 @@ services:
|
|||
|
||||
volumes:
|
||||
mysql-data:
|
||||
redis-data:
|
||||
|
|
|
@ -26,6 +26,8 @@ services:
|
|||
ports:
|
||||
- "6379:6379"
|
||||
restart: always
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
||||
interval: 1s
|
||||
|
@ -61,3 +63,4 @@ services:
|
|||
- "9091:9091"
|
||||
volumes:
|
||||
mysql-data:
|
||||
redis-data:
|
||||
|
|
Loading…
Reference in a new issue