diff --git a/packages/server/src/utils/databases/redis.ts b/packages/server/src/utils/databases/redis.ts index 78701c72d..4c7701726 100644 --- a/packages/server/src/utils/databases/redis.ts +++ b/packages/server/src/utils/databases/redis.ts @@ -73,14 +73,20 @@ export const buildRedis = async (redis: RedisNested) => { Mounts: [...volumesMount, ...bindsMount, ...filesMount], ...(StopGracePeriod !== null && StopGracePeriod !== undefined && { StopGracePeriod }), - ...(command && { - Command: command.split(" "), - }), - ...(args && - args.length > 0 && { - Args: args, - }), - + ...(command || args + ? { + ...(command && { + Command: command.split(" "), + }), + ...(args && + args.length > 0 && { + Args: args, + }), + } + : { + Command: ["/bin/sh"], + Args: ["-c", `redis-server --requirepass ${databasePassword}`], + }), Labels, }, Networks,