Chapter 12: 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