dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

Database services ignore custom command

Open jonhattan opened this issue 4 months ago • 1 comments

To Reproduce

  1. Create redis database service
  2. Configure command: redis-server /usr/local/etc/redis/redis.conf
  3. 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

jonhattan avatar Oct 09 '25 09:10 jonhattan

Image

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.

Siumauricio avatar Nov 26 '25 08:11 Siumauricio

I will close this issue due to inactivity

Siumauricio avatar Dec 07 '25 00:12 Siumauricio