Chapter 17: 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.ymlversion: '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