This might take some time because we need to fetch some docker images from the hub and extract them, but in the end you should be able to visit your Ghost instance under the domain name you have chosen. For me, it was https://blog.niecke-it.de/ If there is a warning about an insecure page, you may need to wait a few moments until Traefik had the time to fetch your SSL certificate.
After everything is set up, we want to create our first user and login with this. For creating the initial user, visit https://your.domain/ghost and fill in your information. You can also invite other users if you plan to use ghost with some colleagues.
Now we are done, and you can start writing your blog!
Conclusion
I think Ghost is a nice tool for writing blogs with an active community, but since the Docker Image is not supported, it can be sometimes tricky to configure and to debug if something is not working. For not technical users, a Ghost instance from ghost.org might be a far better choice. Above all, the fees are really reasonable when you consider how much time and nerves you can save. I just decided to host it myself, because for me, it is just another container running somewhere, and I like to play around with those tools.
What comes next?
You may have noticed that there is no Nginx proxying the requests to Ghost. This might be of interest to you if you expect much more traffic, but then it would also be a good idea to run more than one container with Ghost. Traefik as a reverse proxy does a quite good job for my use case. Furthermore, there is just a single database server, which might not be ideal. There is still work to be done which I will summarize.
- Migrate Ghost to my Kubernetes Cluster once it is running smoothly and scale to at least 2 instances for high availability.
- Migrate the database to a central cluster, which will be a Percona XtraDB cluster in my case.
- And of course revise the design. (Hardest part for me 😅)
Previously posted on blog.niecke-it.de/ghost-on-docker-with-traefik/