Giter Club home page Giter Club logo

gitbook-docker's Introduction

gitbook-docker

  • 因为某些不可描述的原因,访问gitbook非常慢,所以这里使用docker 搭建私有gitbook
  • 网上现有的gitbook的docker镜像比较陈旧,不好用
  • 搭建私有gitlab作为版本控制工具,gitbook渲染网页

运行方式

配置docker和docker-compose环境,尔后运行将需要渲染展示的gitbookgit 仓库的URI填写到docker-compose.yml中,运行

$ git clone https://github.com/IanSmith123/gitbook-docker --depth=1
$ cd gitbook-docker
$ docker-compose up -d

容器启动完成之后访问4000端口即可看到gitbook页面

注:可自行修改端口,建议使用nginx反代到80端口

配置webhook

在git仓库中设置webhook , 当commit事件发生时,触发urlgitbook服务器的4001端口

触发之后,gitbook将会自动git pull然后更新内容

nginx反代

nginx反代配置

server { 
    server_name example.com;
    access_log /var/log/nginx/example_access.log;
    error_log /var/log/nginx/example_error.log;

    location / {
        proxy_pass http://localhost:4000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

todo

  • 配置webhook触发更新gitbook
  • 使用nginx反向代理gitbook80端口

refer:

Les1ie 2018-3-6 15:30:22

gitbook-docker's People

Contributors

iansmith123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gitbook-docker's Issues

怎么进入容器

我要搭建一套内网访问的, 需要使用docker里边的公钥, 怎么弄呢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.