Giter Site home page Giter Site logo

docker-jekyll-nginx's Introduction

docker-jekyll-nginx

building Jekyll websites in docker

Setup

  • Install Docker (https://docs.docker.com/engine/installation/)
  • Download and extract the archive
    wget "https://github.com/gabriele6/docker-jekyll-nginx/archive/master.zip"
    unzip master.zip
    cp -r docker-jekyll-nginx-master/* ./
    rm -r docker-jekyll-nginx-master/ master.zip README.md
  • Edit file permissions
    chmod 777 build_and_serve.sh
    chmod 777 get_and_serve.sh
    chmod 777 restart_containers.sh
  • Fork a Jekyll theme and edit the get_and_serve.sh file with the location of the theme on your repositories (example theme: https://github.com/arkadianriver/spectral)
  • run ./get_and_serve.sh

Alternatively, after installing Docker you can download the script setup.sh to your home directory, edit file permissions with chmod 777 setup.sh, and run it with ./setup.sh.
At this point you have a working theme installed. You might want to fork a theme, edit the get_and_serve.sh script with the forked theme location, and run ./get_and_serve.sh to build everything and serve the site.
If you don't need to download everything again, just run build_and_serve.sh instead.

Remember setup.sh should be executed only once, since it overrides everything and gets you to the default settings.

Running the existing containers automatically at startup

  • view the cron list with crontab -e (as root)
  • add the line @reboot /root/restart_containers.sh somewhere

restart_containers.sh runs the docker containers listed in the containers.txt file in the main directory.
Those containers are created in the build_and_serve.sh script, therefore you shouldn't edit the containers.txt file.

If you want to place your files away from the /root/ directory, edit the cron line accordingly (you must update the build_and_serve.sh and get_and_serve.sh files too with the new path instead of /root/)

docker-jekyll-nginx's People

Contributors

gabriele6 avatar

Watchers

 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.