Closed ahmgam closed 1 year ago
As you can see here the command
property is not passed to dockerode.
This is why command is not currently supported in the context of one click apps, but definitely something that will be added soon.
+1 for this feature.
I've been wondering : why the property
command
is not available in one click apps ?I've traced the function calls starting from
/api/v2/user/apps/appDefinitions/update
here https://github.com/caprover/caprover/blob/a71dfbcd68e0fdd951fc635609a4be6a66a09421/src/routes/user/apps/appdefinition/AppDefinitionRouter.ts#L310 arriving to service update command https://github.com/caprover/caprover/blob/a71dfbcd68e0fdd951fc635609a4be6a66a09421/src/user/ServiceManager.ts#L924 , which usesdockerorde
library , also https://github.com/apocas/dockerode/blob/c4b774077441ca28c25d1040f294d85cee0a5b73/lib/service.js#L97the point is that i've checked the documentation of this endpoint https://docs.docker.com/engine/api/v1.42/#tag/Service/operation/ServiceUpdate, you can see that it's ok to send command property in update service request.
so is there any obstacles in this implementation? am I missing anything?