Host your own Gitbook
Repositories
It is worth exploring these pre-existing repositories:
Prebuilt images based on a
DockerfileCI for build triggers and Gitbook all packaged neatly via
docker-compose.yml
Quick Setup
Without CI
Clone your pre-existing gitbook repo to your cloud-box
cd ~/dev git clone https://github.com/ShoppinPal/docs.shoppinpal.com cd ~/dev/docs.shoppinpal.comAdd the following
docker-compose.ymlfile at the cloned repo's root folder:version: '2' services: gitbook: container_name: training image: billryan/gitbook:latest ports: - "4000:4000" volumes: - ./:/gitbook - ./docker-entrypoint-gitbook.sh:/apps/docker-entrypoint-gitbook.sh entrypoint: /apps/docker-entrypoint-gitbook.shAdd the following
docker-entrypoint-gitbook.shfile at the cloned repo's root folder:#!/bin/bash #gitbook init gitbook serve --log=debug --debug #gitbook build --log=debug --debugSetup permissions:
chmod 744 docker-entrypoint.shRun
docker-compose upto startRun
docker-compose stopto stopRun
docker-compose up --force-recreateto rebuild and launch from scratchRun
docker-compose downto tear it all down and cleanup
With CI
TODO - @harshadyeola can add it here ...
Alternative Setup
Clone your gitbook repo
Use gitbook desktop editor to edit and save
Use cmd line to push changes
Last updated