Ghost on Github running in Docker container.
406
https://github.com/najarramsada/ghost-on-github/
latest, 1.0
ghost-on-github is a Docker container for running Ghost blog on docker and publising on github pages. This is a combination of official Ghost docker image and ghost-on-github scripts in one docker image for ease of deployment and publishing.
Credits to Ghost community and Fernando Paladini for Ghost on Github scripts. All I have done here is combined them both to run the Ghost blog on Docker and also publish on Github pages.
For more information visit: https://ramsada.io/blogs/static/host-your-ghost-blog-on-github-using-docker-container/ For dockerfile and scripts visit: https://github.com/najarramsada/ghost-on-github
https://ramsada.io/blog/static/index.html
docker-compose up -d
Contents of docker-compose.yml file
version: '3'
services:
ghost:
image: najarramsada/ghost-on-github
container_name: ghost #name your container for easy identification.
restart: always
ports:
- 8880:2368 #Ghost is running on 2368, map a custom port to your host server.
volumes:
- ghost:/home/node/.ghost/content #Always a good idea to have a volume for persistent data. If not used, each time you start the container a new instance of blog will be deployed
volumes:
ghost:
Go to your web browser and open a link http://<docker host IP>:<your custom port>/ (e.g. http://192.168.1.14:8880/). Go to http://<docker host IP>:<your custom port>/admin to create your account and edit the blog to your liking. This is also the address for you to write a new post.
Go to https://github.com/ and create a new repository. Copy the HTTPS URL of your repository, e.g. https://github.com/najarramsada/ghost-on-github.git
docker exec -it <Container name or id> gosu node git config --global user.email "<Your Github useremail>"
docker exec -it <Container name or id> gosu node git config --global user.name "<Your Github username>"
docker exec -it <Container name or id> gosu node /tmp/install.sh
For first commit you will need to supply the Github repository URL which was copied in earlier step (e.g. https://github.com/najarramsada/ghost-on-github.git). This script will also prompt you to login to github, enter your username and password. Wait till the repository is pushed to Github pages, than goto settings page of your github repository and it will show you the URL it is published as. Your blog is live on github pages.
Downside of hosting Ghost blog on Github is that each time you write a new post, you need to update the static pages on github, to do that just run below command on host where your Ghost docker is running. This is a same command that was used for first commit and applies for ongoing update.
Edit your blog locally and then run below command to update the blog on github
docker exec -it ghost gosu node /tmp/install.sh
Content type
Image
Digest
Size
278.7 MB
Last updated
about 8 years ago
docker pull najarramsada/ghost-on-github