mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-18 18:05:18 +00:00
refactor: streamline command and args handling in Redis container configuration
- Updated the Redis container build function to simplify the handling of command and arguments. - Ensured default command and arguments are set when none are provided, improving robustness.
This commit is contained in:
@@ -73,14 +73,20 @@ export const buildRedis = async (redis: RedisNested) => {
|
|||||||
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
|
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
|
||||||
...(StopGracePeriod !== null &&
|
...(StopGracePeriod !== null &&
|
||||||
StopGracePeriod !== undefined && { StopGracePeriod }),
|
StopGracePeriod !== undefined && { StopGracePeriod }),
|
||||||
...(command && {
|
...(command || args
|
||||||
Command: command.split(" "),
|
? {
|
||||||
}),
|
...(command && {
|
||||||
...(args &&
|
Command: command.split(" "),
|
||||||
args.length > 0 && {
|
}),
|
||||||
Args: args,
|
...(args &&
|
||||||
}),
|
args.length > 0 && {
|
||||||
|
Args: args,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
Command: ["/bin/sh"],
|
||||||
|
Args: ["-c", `redis-server --requirepass ${databasePassword}`],
|
||||||
|
}),
|
||||||
Labels,
|
Labels,
|
||||||
},
|
},
|
||||||
Networks,
|
Networks,
|
||||||
|
|||||||
Reference in New Issue
Block a user