Ghost

Just a blogging platform.

docker-compose.yml (Docker Community)

version: '3.1'
 
services:
 
  ghost:
    image: ghost:5-alpine
    restart: always
    ports:
      - 8080:2368
    environment:
      # see https://ghost.org/docs/config/#configuration-options
      database__client: mysql
      database__connection__host: db
      database__connection__user: root
      database__connection__password: example
      database__connection__database: ghost
      # this url value is just an example, and is likely wrong for your environment!
      url: http://localhost:8080
      # contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
      #NODE_ENV: development
    volumes:
      - ./ghost:/var/lib/ghost/content
 
  db:
    image: mysql:8.0
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
    volumes:
      - ./db:/var/lib/mysql

docker-compose.yml (Bitnami)

version: '2'
services:
  mysql:
    image: docker.io/bitnami/mysql:8.4
    volumes:
      - './mysql_data:/bitnami/mysql'
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
      - MYSQL_USER=bn_ghost
      - MYSQL_DATABASE=bitnami_ghost
  ghost:
    image: docker.io/bitnami/ghost:5
    ports:
      - '80:2368'
    volumes:
      - './ghost_data:/bitnami/ghost'
    depends_on:
      - mysql
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
      - GHOST_DATABASE_HOST=mysql
      - GHOST_DATABASE_PORT_NUMBER=3306
      - GHOST_DATABASE_USER=bn_ghost
      - GHOST_DATABASE_NAME=bitnami_ghost

Resources

Website: https://ghost.org/

Docker Hub (Docker Community): https://hub.docker.com/_/ghost

Docker Hub (Bitnami): https://hub.docker.com/r/bitnami/ghost

Configuration: See the Docker Hub pages