Docker - images not loading and settings resetting

Did you manage to fix this and if so how.

I have the same issue. I had to change the number of posts allowed in the packages.json file which will overwrite on the next update.

I have very little knowledge of ghost but searching through the forum I found this and surprisingly it’s not locked.

I have a clean install of ghost running on docker.

Any help would be appreciated if you can spare the time.

1 Like

I’m not sure if the OP will see your message, but it’d be good to look in your console logs (even on desktop) for any errors. If you can link the site, I can have a look also!

Sometimes this behavior can be caused by having a mix of http and https in your config file.

Cathy,

I did a little experimenting so apologies on the delay to the reply and yes, its Sunday.

I shutdown the stacks and restarted and sure enough the changes I made to the Json file have reverted to the defaults, as I thought they would

So, the site index page has defaulted to the standard 25 posts even though there are more than that (about 29).

There still appears to be a problem with images as well, and the email system looks to have reset itself as well.

Here is the site. I have left it as is, so you can see the issues.

www.braedach.com

Here is the docker-compose file

I can’t see any logging error in the mysql8 log or in the ghost log

I need to make my changes permanent or at least survive a host restart.
Site is deployed via stacks in Portainer with host bind volumes.

Oh, I forgot the ghost stack is protected via an open-appsec stack that is enabled for this domain, but nothing is being logged as its all behind an Ubiquiti UDM router. I see nothing in the security logs, so I believe it’s not interfering.

Any advice will be appreciated.

Kind Regards
Leon.

I’m going to fork the original thread, because I’m not sure it is related to where you posted it.

I looked at your site. You’ve got some images appearing, but others missing. You also have a bunch of errors in your console logs. (I’m not sure if you checked those - you press F12 in the browser and then open the ‘console’ tab to see them.)

Some messages:

FeedbackPage.js:12 Mixed Content: The page at 'https://www.braedach.com/' was loaded over HTTPS, but requested an insecure resource 'http://www.braedach.com/members/api/member/'. This request has been blocked; the content must be served over HTTPS.

and…

Mixed Content: The page at 'https://www.braedach.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.braedach.com/page/2/'. This request has been blocked; the content must be served over HTTPS.

^^ that’s infinitescroll.js not loading.

This is consistent with having http instead of https somewhere in your config.production.json file (or in your case, the env file equivalent). You’ll want to get everything using https.

But… I think you also need to do some debugging of your Portainer setup. What you’re describing (missing images, changes in package.json resetting) suggests that you’re maybe not correctly persisting file-system changes. The posts are there because the database is fine, but some of the images (which go into /content/images) are not. The mixed content warning can cause the browser not to load your images, but in your case, at least some of them are not there at all, as far as I can tell.

1 Like

Got it. I will look at it tomorrow

Thanks

It sounds like your changes are getting overwritten due to updates. One solution is to mount a custom packages.json file as a volume in Docker to persist changes. Also, check if setting environment variables can achieve the same result without modifying core files.

Andrew

Its fixed - thankyou. I forgot to change the URL to https after i moved it all to SSL.

Sincerely
Leon

1 Like