ghostboard / ghost-purge-images

CLI tool to display & purge the uploaded images, video and audio files that currently are not used in any post, page or meta data
MIT License
90 stars 4 forks source link

Make it works with Docker based intallation #16

Closed MoryCorp closed 2 years ago

MoryCorp commented 3 years ago

Hi, whenever I try to make the script works with my docker installation I got an error :

Error reading config.production.json Error: Cannot find module config.production.json So I tried to BS by creating this file following the official Ghost doc just to indicate the path of my content and then : Error: TypeError: Cannot read property 'endsWith' of undefined

Have you ever experienced this ? Thanks

F-Node-Karlsruhe commented 3 years ago

I had a smiliar issue: installing the npm package in the docker container works fine but running it throws an error that the api can't be reached

buarle commented 3 years ago

same here...

first error happens when located in /content floder second error happends when located one directory up where "config.production.json" is

F-Node-Karlsruhe commented 3 years ago

After going into the container and changing the url in config.production.json to the domain with https it works just fine. As far as I know the ghost api demands https, so leaving the default localhost:2365 does produce an invalid api response.

buarle commented 3 years ago

worked perfectly! thanks man!

MoryCorp commented 3 years ago

After going into the container and changing the url in config.production.json to the domain with https it works just fine. As far as I know the ghost api demands https, so leaving the default localhost:2365 does produce an invalid api response.

Awesome, thanks for the help

dburgos commented 2 years ago

I added the optional parameter url, so now you can point the tool to use that URL instead of editing the config.production.json file, hope it helps. Learn more in the readme