caprover / caprover

Scalable PaaS (automated Docker+nginx) - aka Heroku on Steroids
https://CapRover.com
Other
13.02k stars 831 forks source link

command property in one click app yaml #1745

Closed ahmgam closed 1 year ago

ahmgam commented 1 year ago

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 uses dockerorde library , also https://github.com/apocas/dockerode/blob/c4b774077441ca28c25d1040f294d85cee0a5b73/lib/service.js#L97

the 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?

githubsaturn commented 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.

dreadedhamish commented 9 months ago

+1 for this feature.