Through this guide, we will learn how to set up your blog with Ghost.
First, check this repository and fork it.
The project is prod-ready so it will set an SSL certificate you can use your own domain using
Now we need to choose a cloud provider, for this example, I'm going to use Digital Ocean. You can choose your favorite one. We just need a Linux environment and Docker 🐳.
Open the console of your server and clone the repo.
1
git clone https://github.com/demonpo/ghost-blog-docker-compose
Now move to the project's folder and create a new .env file. You can use the .env.example file as a reference
1
2
3
4
DATABASE_PASSWORD=secret // The DB will be created using this password
GHOST_URL=http://localhost:8080
DOMAIN=localhost
EMAIL=some@email.com //This email is used for the ssl certificate creation
A prod .env example will be
1
2
3
4
DATABASE_PASSWORD=TTn4Y7wUyh4rGvapFzUBfGZPVfTvU
GHOST_URL=https://mydomain.com
DOMAIN=mydomain.com
EMAIL=some@email.com
Now you just need to run
1
docker compose up -d
And let the magic begin 🪄.
Finally, you can go to your website and you should see your blog ready to be used 🥳.