Strapi Dockerized Application Not Connecting to Redis for Caching

I have a Strapi application that I’ve dockerized and I’m trying to implement Redis caching for better performance. However, I’m facing issues with the Redis connection. I’ve configured the Redis settings in my plugins.js file as follows:

module.exports = {
    redis: {
        config: {
            connections: {
                default: {
                    connection: {
                        host: process.env.REDIS_HOST,
                        port: process.env.REDIS_PORT || 6379,
                        db: process.env.REDIS_DB || 0,
                    settings: {
                        debug: false,
    "rest-cache": {
        config: {
            provider: {
                name: "redis",
                options: {
                    max: 32767,
                    connection: "default",
            strategy: {
                enableEtagSupport: true,
                logs: true,
                clearRelatedCache: true,
                maxAge: 3600000,
                contentTypes: [
                        contentType: "api::activity.activity",
                        maxAge: 3600000,
                        hitpass: true,
                        keys: {
                            useQueryParams: true,
                            useHeaders: ["accept-encoding"],
                        method: "GET",

Is there anything specific I need to consider when using Redis caching with a Dockerized Strapi application?

How can I verify that my Strapi container can reach the Redis container within the Docker network?

Are there any additional configurations required to enable Redis caching properly in Strapi?

Any help or suggestions on how to troubleshoot and resolve this Redis connection issue in my Dockerized Strapi application would be greatly appreciated. Thank you!

I dockerized my Strapi application successfully, and the container is up and running without any issues. The strapi says connect to redis: (

But there are no log in redis:(

Make sure your passing those args when you are building the docker image.
Also what is the HOST you are using for redis here, is it in it’s own docker image?