It is worth exploring these pre-existing repositories:
Prebuilt images based on a Dockerfile
CI for build triggers and Gitbook all packaged neatly via docker-compose.yml
Clone your pre-existing gitbook repo to your cloud-box
cd ~/devgit clone https://github.com/ShoppinPal/docs.shoppinpal.comcd ~/dev/docs.shoppinpal.com
Add the following docker-compose.yml
file at the cloned repo's root folder:
version: '2'services:gitbook:container_name: trainingimage: billryan/gitbook:latestports:- "4000:4000"volumes:- ./:/gitbook- ./docker-entrypoint-gitbook.sh:/apps/docker-entrypoint-gitbook.shentrypoint: /apps/docker-entrypoint-gitbook.sh
Add the following docker-entrypoint-gitbook.sh
file at the cloned repo's root folder:
#!/bin/bash#gitbook initgitbook serve --log=debug --debug#gitbook build --log=debug --debug
Setup permissions: chmod 744 docker-entrypoint.sh
Run docker-compose up
to start
Run docker-compose stop
to stop
Run docker-compose up --force-recreate
to rebuild and launch from scratch
Run docker-compose down
to tear it all down and cleanup
TODO - @harshadyeola can add it here ...
Clone your gitbook repo
Use gitbook desktop editor to edit and save
Use cmd line to push changes