Giter VIP home page Giter VIP logo

pelican-dockerfile's Introduction

Pelican Dockerfile

A base docker setup that inherits Python 2 and loads a bunch of deps. It runs Pelican in autoload mode for dev.

This is an easy to use image to setup a Pelican static website. This image will run the Pelican devserver, which means it will watch for changes in the content and theme files.

Also a volume has been added so you can simply map to an existing Pelican directory and the container will update the output.

Some sane requirements have been pre-built into the image.

Using on a MAC

Creating a new site

To create a new direcotry to be used as a site:

docker run -it --rm -v $(pwd):/srv/pelican mjjacko/pelican pelican-quickstart -p my-site

This will create a subdirecotry from the local directory $(pwd) and provision it based on how you answered the questions.

Running as a development server

There are two ways to run this. We are using --name option to make things easier later :

  1. As a always running container - so the output will stream to the screen
cd my-site    # Go to the directory. Youshould also start another console or editor. 
docker run --rm -v $(pwd):/srv/pelican --name pelican-dev -p 8000:8000  mjjacko/pelican
  1. as a daeamon, using docker to push it to the background.
cd my-site
docker run --rm -v $(pwd):/srv/pelican -d --name pelican-dev -p 8000:8000  mjjacko/pelican

In both cases It takes 2-3 minutes for the first time. The web server will run locally on port 8000.

Viewing logs

The logs are viewable as output whne running directly, and when the container runs as a background task (the -d) you can view the logs using :

docker logs -f pelican-dev

In both cases, any changes to the files will cause the output to be regenreated.

Stopping the container

To stop the container, since we named it, you can stop it with

docker stop pelican-dev

Docker Hub repo

The DockerHub repository can be found here: https://hub.docker.com/r/mjjacko/pelican/

Using the image

License

BSD 2-Clause license

pelican-dockerfile's People

Contributors

alainchiasson avatar matthewjackowski avatar

Watchers

James Cloos 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.