Skip to main content

πŸ‘» Chapter 9: Creating the Ghost Project with Docker Compose

Now that Docker and Docker Compose are installed and working, it’s time to deploy your blog platform β€” Ghost!

Ghost is modern, fast, and perfect for personal blogs or professional content. With Docker Compose, you’ll have it running in just a few commands.

πŸ“ Step 1: Create the Project Directory

We’ll keep everything organized in one folder.

mkdir ~/ghost
cd ~/ghost


πŸ“ Step 2: Create the docker-compose.yml File

Inside the ~/ghost folder, create the file:

vim docker-compose.yml
version: '3'
services:
  ghost:
    image: ghost:latest
    container_name: ghost-blog
    restart: always
    ports:
      - "2368:2368"
    environment:
      url: https://hexacats.online
    volumes:
      - /vw-data/ghost:/var/lib/ghost/content

πŸ“Œ Replace yourdomain.com with your actual domain
πŸ“ Make sure the volume path /vw-data/ghost exists and is writable

πŸ‘€ Tip: If you're logged in as dockeruser, make sure /vw-data/ghost has correct permissions.


docker-compose up -d

docker ps