# Vuepress

This platform was created using Vuepress, nginx, and Docker.

Vuepress Docker image is built from the repo on Github

I host this locally on my own docker swarm as well as cloning it to Github Pages

Code highlighting list by PrismJS

# Docker config

Here's the docker stack file used to build on my swarm; it also includes a web server to view the website locally. docker-compose.yml

version: "3.4"
services:
  vuepress:
    image: blasteh/vuepress
    environment:
      - USE_HOOK=1
      - GITHUB_REPO=github.com/blastehh/my_source_repo.git
      - GITHUB_TOKEN=mysecretkey
      - GITHUB_PUSH_REPO=github.com/blastehh/blastehh.github.io.git
    deploy:
      replicas: 1
      restart_policy:
        condition: any
      placement:
        constraints: [node.role != manager]
      update_config:
        delay: 30s
        order: start-first
    ports:
      - "9090:9000/tcp"
    volumes:
      - /mnt/srv/vuepress/src/:/root/src/
      - /mnt/srv/vuepress/html/:/root/html/
  web:
    image: nginx:stable-alpine
    depends_on:
      - vuepress
    deploy:
      replicas: 2
      restart_policy:
        condition: any
      update_config:
        delay: 30s
        order: start-first
      placement:
        constraints: [node.role != manager]
    ports:
      - "8080:80/tcp"
    volumes:
      - /mnt/srv/vuepress/html/:/usr/share/nginx/html/

Stack launched with the command:

docker stack deploy -c docker-compose.yml vuepress

Currently using Portainer to run this stack.

This page was last updated: 08/11/2019, 16:15:52