Fixing Ghost Issues in a Docker Installation - Part I
Ghost self-hosted has been running in my Docker container for a few days now based on the docker compose example in the official documentation:
Of course, my preference would be to have this running in Portainer which is why I modified the details slightly. The only difference is that I chose to run the latest 5-alpine base and used a few environment variables for portability. It's been noted that there may be some small nuances of using Alpine but that didn't bother me for this initial foray:
I'm using the latest Casper theming with code injections to beautify the social media links. This is intentional, mind you, since to my mind there is a higher probability to rule out the odd misconfiguration occurrences while I try to grasp this new blogging platform. Well, misconfigurations I did find.
Problem #1: Home and About pages resolve to the internal IP address and port
The first one being that after I had re-configured my domain DNS entries to point to my docker instance, thus, I had missed a step and not modified the url: environment variable to now use the FQDN instead. Because of this the Home and About pages kept referring to the internal IP and TCP port. A minor nuisance since the blog entries themselves were viable. That itself sent me down a few rabbit holes trying to see if there was a way to modify the theme template using code injection; whereas a simple stack relaunch and URL correction would have sufficed.
Problem #2: Blog entry images not displaying
What is weird is that the Unsplash or any manually uploaded images display correctly. Images copy/pasted or manually uploaded did not. This is sort of a deal breaker for me since pictures say a thousand more words more effectively, surely. This is how the webiste looked on the desktop and mobile:
What is weird is that these images would display when using Firefox but not on any other browser I installed for testing on my mobile devices. This leads me to believe this is related to mixed content issues (SSL and non-SSL image links) that Chome-based browsers now refuse to allow due to historical abuse. Firefox more forgiving that Edge in terms of content display, now that is new to me.
Where does one go from here? The fixes mention double checking your reverse proxy configuration (usually nginx or derivatives like Nginx Proxy Manager), or even going upstream to your DNS entries if using some sort of esoteric configuration.
What I discovered while reconfiguring my DNS after installing Ghost in a LXC (Linux Container) was that I had left the front-end configuration to use plain-old HTTP, whereas the default Docker install correctly configures for HTTPS.
Yeah, I missed that part. At the same time I'm already a step away towards the next part of this saga in Part II!