Skip to content

Redis health check fails #604

@shawnlinator

Description

@shawnlinator

Docker version 29.1.5, build 0e6fee6
Issue at line: https://github.com/mhdzumair/MediaFusion/blob/8972b1ff7eafc821cb0344e93440f3b2119216e8/deployment/docker-compose/docker-compose.yml#L157C59-L157C72

Using docker-compose for deployment, redis never becomes healthy. To get it to work, I had to modify the grep search to remove the "$" at the end of the health check:

      test: ["CMD-SHELL", "redis-cli --raw INFO | grep -q '^loading:0$'"]

Without the "$", only the desired line loading:0 from the redis-cli --raw INFO was still matched:

root@a9a33f9dc87a:/data# redis-cli --raw INFO | grep '^loading:0'
loading:0

Alternatively, other queries that included whitespaces did match correctly:

root@a9a33f9dc87a:/data# redis-cli --raw INFO | grep '^loading:0$'
root@a9a33f9dc87a:/data# redis-cli --raw INFO | grep '^loading:0\s$'
loading:0
root@a9a33f9dc87a:/data# redis-cli --raw INFO | grep '^loading:0\s*$'
loading:0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions