Skip to main content

BookStack Installation

With Docker

Tutorial:

docker-compose.yml:

version: "2"
services:
  bookstack:
    image: linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - DB_HOST=bookstack_db
    - DB_USER=<db-user>
    - DB_PASS=<db-pass>
      - DB_DATABASE=bookstackapp
    volumes:
      - ./config:/config
    ports:
      - 6875:80
      - 443:443
    restart: unless-stopped
    depends_on:
      - bookstack_db

  bookstack_db:
    image: linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=1000
      - PGID=1000
    - MYSQL_ROOT_PASSWORD=<db-pass-root>
      - TZ=Asia/Taipei
      - MYSQL_DATABASE=bookstackapp
    - MYSQL_USER=<db-user>
    - MYSQL_PASSWORD=<db-pass>
    volumes:
      - ./config:/config   
    restart: unless-stopped

初始化容器及啟動服務

mkdir config
docker-comose up -d
docker-compose ps

服務啟動與停止

docker-compose start
docker-compose stop

移除容器

docker-compose down
With CentOS 7

Reference