OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Database

  • Overview of the ecosystem
  • ORM frameworks
    • Java
      • Spring Boot
      • Spring Batch
      • Use Spring JDBC to connect to OceanBase Database
      • Spring Data JPA
      • Hibernate
      • MyBatis
      • jOOQ
    • Python
      • Use SQLAlchemy to connect to OceanBase Database
      • Connect to OceanBase Database by using peewee
      • Use Tortoise ORM to connect to OceanBase Database
    • Go
      • Connect to OceanBase Database by using GORM
      • beego ORM
    • Rust
      • SeaORM Connection to OceanBase Database
      • Diesel Connection to OceanBase Database
    • Ruby
      • Active Record
      • Sequel Connection to OceanBase Database
      • Connect to OceanBase Database by using Ruby on Rails
    • Node.js
      • Sequelize
      • TypeORM
      • Prisma
      • Drizzle
    • C#
      • Dapper
      • SqlSugar
      • FreeSQL
    • PHP
      • Connect to OceanBase Database by using the Yii 2.0 ORM
      • Connect to OceanBase Database by using Laravel Eloquent ORM
      • CakePHP
  • Database version management
    • Liquibase
    • Flyway
  • Data integration
    • Flink
      • Apache Flink
      • Flink DirectLoad
      • Flink Connector OceanBase
    • dbt
    • SeaTunnel
    • Maxwell
    • Debezium
    • Spark Catalog
    • NiFi
    • Qlik Replicate
    • RisingWave CDC
    • Flume
    • Migrate data from SQL Server to OceanBase Database by using MySQL Workbench
  • SQL development
    • WebLogic
    • DBeaver
    • Navicat
    • DataGrip
    • TablePlus
    • DMS
  • Orchestration and scheduling
    • Airflow
    • PowerJob
    • DolphinScheduler
    • Linkis
  • Visualization tools
    • Superset
    • Excel
    • Power BI
    • Quick BI
    • Tableau
    • GuanData
    • vividime
    • DataV
    • Metabase
    • Redash
    • FineReport
  • Database management
    • NineData
    • Bytebase
    • DataHub
    • Zabbix
  • AI
    • OpenAI
    • Qwen
    • LangChain
    • LlamaIndex
    • Dify
    • n8n
    • Trae
    • SpringAI
    • Cline
    • Cursor
    • Continue
    • MCP Toolbox
    • CamelAI
    • Firecrawl
    • Hugging Face
    • Ollama
    • Google Gemini
    • Cloudflare Workers AI
    • DB GPT
    • Jina AI
    • Augment Code
    • Claude Code
    • Kiro
    • GPT4All
  • Application
    • Ghost
    • Jira
    • Seata
    • SAP Crystal Reports
  • Middleware
    • Apache Pulsar

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Database
  3. master

Ghost integration with OceanBase Database

Last Updated:2026-09-04 07:40:45

Compatibility
Prerequisites
Procedure
Step 1: Obtain the OceanBase Database connection string
Step 2: Create a database for Ghost
Step 3: Create a Docker Compose configuration file
Step 4: Deploy and start Ghost
Step 5: Access the Ghost blog
Verification

Ghost is an open-source publishing platform built on modern Node.js technology, designed for teams that require robust features, flexibility, and high performance. This topic explains how to deploy Ghost using Docker Compose and connect it to OceanBase Database as the backend storage, enabling persistent storage and management of blog content.

Compatibility

  • OceanBase Database version: ≥ V4.2.1
  • Ghost version: ≥ 5.0

Prerequisites

Before using Ghost, ensure the following conditions are met:

  • Docker and Docker Compose are installed. For installation instructions, refer to the Docker official documentation.
  • OceanBase Database has been deployed and a MySQL mode user tenant has been created.

Procedure

Step 1: Obtain the OceanBase Database connection string

Contact the OceanBase Database deployment personnel to obtain the connection string. For example:

obclient -h$host -P$port -u$user_name -p$password -D$database_name

Parameter description:

  • $host: The connection IP address. For ODP connections, use the ODP address; for direct connections, use the OBServer IP.

  • $port: The connection port. For ODP connections, the default is 2883; for direct connections, the default is 2881.

  • $database_name: The database name.

    Notice

    The user connecting to the tenant must have the CREATE, INSERT, DROP, and SELECT permissions on the database.

  • $user_name: The connection account. For ODP connections, the format is user@tenant#cluster or cluster:tenant:user; for direct connections, the format is user@tenant.

  • $password: The account password.

Example:

obclient -hxxx.xxx.xxx.xxx -P2881 -utest_user001@mysql001 -p****** -Dtest

Step 2: Create a database for Ghost

Create a database in OceanBase Database to store blog data for Ghost, for example, ghost_db.

CREATE DATABASE ghost_db;

After the execution is complete, record the database name for use in the Docker Compose configuration file.

Step 3: Create a Docker Compose configuration file

In your local working directory, create a docker-compose.yml file and configure Ghost to connect to OceanBase Database.

version: '3.8'

services:
  ghost:
    image: ghost:5-alpine
    container_name: ghost-blog
    restart: always
    ports:
      - "2368:2368"
    environment:
      database__client: mysql
      database__connection__host: $host
      database__connection__user: $user_name
      database__connection__password: $password
      database__connection__database: ghost_db
      database__connection__port: $port
      url: http://localhost:2368
      NODE_ENV: production
    volumes:
      - ./ghost-content:/var/lib/ghost/content
    network_mode: "bridge"

networks:
  default:
    external: false

Configuration parameter description:

  • database__client: mysql: Specifies to use the MySQL client to connect to OceanBase Database.
  • database__connection__host: The connection address of OceanBase Database.
  • database__connection__user: The username of OceanBase Database.
  • database__connection__password: The password of OceanBase Database.
  • database__connection__database: The database name (recommended: ghost_db).
  • database__connection__port: The port of OceanBase Database.

Step 4: Deploy and start Ghost

In the directory where docker-compose.yml is located, execute the following commands to pull the image and start the Ghost service.

  1. Pull the Ghost image:

    docker compose pull
    
  2. Start the Ghost service:

    docker compose up -d
    

After the commands are executed successfully, the Ghost container will start in the background.

Step 5: Access the Ghost blog

  1. Access the homepage: In your browser, enter http://host IP address:2368 to access the Ghost homepage.

    Note

    If you encounter a 502 error, check if the firewall within the instance is blocking the connection. You can disable the firewall.

  2. Access the management page: In your browser, enter http://host IP address:2368/ghost to access the Ghost management page.

    When you first access the Ghost management page, you need to complete the relevant configuration according to the prompts on the page. Please complete the configuration based on the actual prompts on the page.

Verification

After completing the above steps, you can verify if Ghost is running properly by following these methods:

  1. Check the container status:

    docker ps | grep ghost-blog
    
  2. View the container logs:

    docker logs ghost-blog
    
  3. Access the Ghost homepage and management page to confirm that they can be displayed and operated normally.

Previous topic

GPT4All
Last

Next topic

Jira
Next
on this page
Compatibility
Prerequisites
Procedure
Step 1: Obtain the OceanBase Database connection string
Step 2: Create a database for Ghost
Step 3: Create a Docker Compose configuration file
Step 4: Deploy and start Ghost
Step 5: Access the Ghost blog
Verification