Easy way to force docker image prune and cache clear thru API or any cron task...
complete
M
Mark Topper
The endpoints you are looking for are below.
Docker > Cleanup Images:
POST /api/trpc/settings.cleanupDockerImages
Docker > Cleanup Build:
POST /api/trpc/settings.cleanupDockerBuilder
Docker > System Prune:
POST /api/trpc/settings.systemPrune
M
Mark Topper
complete
M
Mark Topper
The endpoints you are looking for are below.
Docker > Cleanup Images:
POST /api/trpc/settings.cleanupDockerImages
Docker > Cleanup Build:
POST /api/trpc/settings.cleanupDockerBuilder
Docker > System Prune:
POST /api/trpc/settings.systemPrune
G
Gabriel Fava
Mark Topper Yeah, i did a scraper task that call those endpoints to force a rebuild, the only 'ugly' thing is the way i am doing to generate a session token, i am mocking a call to /api/trpc/auth.login and capturing the data.json.token, is there any other elegant way to do it?
i also noticed that i cant use this token to other api calls like GET all projects or any other get call to some endpoints that i watch in logs, is this expected?
M
Mark Topper
Gabriel Fava I haven't tested if this endpoint works with the API key, that you can find and generate under "EasyPanel > Settings > Users"
G
Gabriel Fava
Mark Topper I am still facing some issues on it... once i publish a new version of my docker image with tag LATEST, and i try to cleanupDockerImages and after a REDEPLOY, it not capuring the latest, is seems a cache in the middle, only when i hit a lot of .'deploy' button in sequence it kind of update the image... what should be the correct order of actions and waiting time between each step in order to guarante that i my image is the last?
M
Mark Topper
Gabriel Fava Does it work if you clean the images and force rebuild?
G
Gabriel Fava
Mark Topper partially ,just after i publish my new image with tag LATEST for example, I need to clear all stuff, wait arround 20 seconds, then hit deploy / rebuild a 3 times ... only after that the deploy capture the most up-to-date image... if i only clear and straight forward click in redeploy / deploy it still capture the oldest version.
Suporte Symbit
Mark TopperHello,
Where can I find the list of all the methods available in the easypanel API and how to use it with curl?
Thanks in advance
M
Mark Topper
Suporte Symbit There hasn't been made a full list. Let me know which you are requesting, then I will send you a CURL that can do it.
Suporte Symbit
Mark Topper Thank you for your attention, I want to create a service via API with a curl request to a new WordPress instance.
I would really appreciate your help. Thanks