Database services ignore custom command
To Reproduce
- Create redis database service
- Configure command:
redis-server /usr/local/etc/redis/redis.conf - Start the service
Current vs. Expected behavior
Current behaviour
docker service inspect ${SERVICE_NAME} shows this command and args:
"Command": [
"/bin/sh"
],
"Args": [
"-c",
"redis-server --requirepass foobar"
],
Expected
Expected is to incude "Args": ["-c", "redis-server", "/usr/local/etc/redis/redis.conf"]
Provide environment information
Dokploy version: 0.25.4
Which area(s) are affected? (Select all that apply)
Databases
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
I've seen the same behaviour for mysql, where there's no default command and my custom command is ignored.
I've tested by retrieving the redis object via API and the custom command is there.
Will you send a PR to fix it?
Maybe, need help
I see that the command is working perfectly. The error thrown by the container is because the file does not exist, but as such it is working.
I think we should not split the string because internally we do a /bin/sh -c ‘"’ <- command and there it expects an unsplit literal string.
I will close this issue due to inactivity