training.shoppinpal.com
  • Introduction
  • 1. The Ideal Workspace
    • The Perfect Machine
      • For Biz Team
      • For Developers
      • For Designers
    • Setup a machine in the cloud
      • Solution
      • Setup box on Azure
        • Create a machine on Azure
        • Test drive your remote machine
        • Setup Dropbox On Azure
      • Setup box on DigitalOcean
        • Setup UI
        • Shared FileSystem
          • Dropbox
            • Use locally developed node modules in another project
          • sshfs
        • Long Running Sessions
      • Feedback
  • 2. Learning Git
    • Static Code Analysis
  • 3. The Backend
    • Use Containers
    • Setup a loopback project
    • Lockdown
    • Build a better mousetrap
    • The abyss stares back
    • Built-in models
    • Extending built-in models
    • Understanding UserModel
    • Boot Scripts
    • Promises
    • Find roles for current user
    • Loopback Console
    • Current User
  • 4. Multi-tenancy With Loopback
    • What is Multi-Tenancy
    • Architecting with Loopback
    • Define scope for Roles
    • Role Resolvers
    • Access Control For Tenants
    • Better Programming with multi-tenancy
  • 5. The Frontend
    • The Browser
    • Unit Testing
      • Motivation behind this blog
      • How to write a test
      • Karma and Jasmin
      • Writing Tests
    • End-2-End Testing
    • Angular 1.x
    • Angular 2
      • Testing
  • 6. ElasticSearch
    • Better Search with NGram
    • NGram with Elasticsearch
    • Fun with Path Hierarchy Tokenizer
    • Working with Mappings and Analyzers
  • 7. Promises
    • What are Promises
    • Promise Implementations
    • Nuances
    • What should we use
  • 8. Learning Docker
    • Docker Swarm
  • 9. Queues & Workers
    • PHP workers in AWS EBS
    • NodeJS workers in AWS EBS
      • SQS Daemon by AWS
      • SQS Daemon in NodeJS
      • SQS polling by worker
    • Gearman
  • 10. Docker
    • Capabilities
  • Appendix
    • Bug in WebStorm deployments
    • The Perfect Terminal
    • Scalable App Deployment with AWS
    • Chrome Tips & Tricks
    • Host your own Gitbook
    • Gitbook Tips & Tricks
    • How to handle support incidents
    • Dev Resources
    • Debug e2e Tests on CircleCI
    • Logging
    • Authentication Principles
    • Mac
    • nvm
    • Unify testing with npm
      • Debugging Mocha
    • Sequence Diagrams
    • Project Sync via IDE
      • SFTP with WebStorm
      • SFTP with Visual Studio
    • Soft Linking
    • NodeJS Profiling
      • How to find node.js performance optimization killers
    • Setup Packer on Azure
Powered by GitBook
On this page
  • Repositories
  • Quick Setup
  • Without CI
  • With CI
  • Alternative Setup
  1. Appendix

Host your own Gitbook

PreviousChrome Tips & TricksNextGitbook Tips & Tricks

Last updated 7 years ago

Repositories

It is worth exploring these pre-existing repositories:

  1. Prebuilt images based on a Dockerfile

  2. CI for build triggers and Gitbook all packaged neatly via docker-compose.yml

  3. Others

Quick Setup

Without CI

  1. 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.com
  2. Add the following docker-compose.yml file 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.sh
  3. Add the following docker-entrypoint-gitbook.sh file at the cloned repo's root folder:

    #!/bin/bash
    #gitbook init
    gitbook serve --log=debug --debug
    #gitbook build --log=debug --debug
  4. Setup permissions: chmod 744 docker-entrypoint.sh

  5. Run docker-compose up to start

  6. Run docker-compose stop to stop

  7. Run docker-compose up --force-recreate to rebuild and launch from scratch

  8. Run docker-compose down to tear it all down and cleanup

With CI

  1. TODO - @harshadyeola can add it here ...

Alternative Setup

  1. Clone your gitbook repo

  2. Use gitbook desktop editor to edit and save

  3. Use cmd line to push changes

https://github.com/billryan/docker-gitbook
https://github.com/humangeo/gitbook-docker
https://github.com/corncandy/docker-cluster
https://github.com/tobegit3hub/gitbook-server
https://github.com/humangeo/gitbook-docker