GithubHelp home page GithubHelp logo

dnascimento / vuepress-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blastehh/vuepress-docker

0.0 2.0 0.0 14 KB

Home Page: https://hub.docker.com/r/blasteh/vuepress

License: MIT License

Dockerfile 23.88% Shell 76.12%

vuepress-docker's Introduction

Simple build of vuepress using Alpine Linux on Docker.

The image has 2 folders, 1 for input files, 1 for output files. Mount these folders to use the image:

Input folder: /root/src

Output folder: /root/html

When the build runs, it will take contents of the input folder, generate the site, and then place them in the output folder. This image regenerates the files every 23 hours unless you use the hook option. Webhook is supplied by Hookdoo

Environment variables

USE_HOOK - The web hook is enabled as long as this is present.

GITHUB_REPO - Remove "https://" from the url; e.g. use GITHUB_REPO=github.com/blastehh/vuepress-docker.git instead of GITHUB_REPO=https://github.com/blastehh/vuepress-docker.git

GITHUB_TOKEN - Needed to access private repos, otherwise will try to access a public repo.

GITHUB_PUSH_REPO - URL of repo to push to once build finishes, e.g. github.com/blastehh/mypage.git

GITHUB_PUSH_TOKEN - Set the token for pushing to Github if different from GITHUB_TOKEN

Example docker command

This will automatically regenerate the source files every 23 hours.

docker run --name vuepress -v /host/vuepress/files/:/root/src/:rw -v /host/vuepress/output/:/root/html/:rw -d blasteh/vuepress

Github example:

This will pull from the repo before generating the files.

docker run --name vuepress -v /host/vuepress/files/:/root/src/:rw -v /host/vuepress/output/:/root/html/:rw -d -e GITHUB_REPO=github.com/blastehh/vuepress-docker.git blasteh/vuepress

Github example with a Personal access token:

This will pull from a private repo before generating the files.

docker run --name vuepress -v /host/vuepress/files/:/root/src/:rw -v /host/vuepress/output/:/root/html/:rw -d -e GITHUB_REPO=github.com/blastehh/vuepress-docker.git -e GITHUB_TOKEN=TOKENHERE blasteh/vuepress

Github with hooks example:

This will listen for a webhook, and then pull from a private repo before generating the files. Trigger the hook via http://<container address>:9000/hooks/vuepress-webhook

docker run --name vuepress -v /host/vuepress/files/:/root/src/:rw -v /host/vuepress/output/:/root/html/:rw -d -p 9000:9000 -e USE_HOOK=1 -e GITHUB_REPO=github.com/blastehh/vuepress-docker.git -e GITHUB_TOKEN=TOKENHERE blasteh/vuepress

vuepress-docker's People

Contributors

blastehh avatar hrb981027 avatar

Watchers

James Cloos avatar  avatar

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.