Permalink
Browse files

Nikola 8

  • Loading branch information...
hjacobs committed Jan 4, 2019
1 parent 1fc12e4 commit 9b47e8b42e55d1983833dfbdcd2903ad4bff5b6e
Showing with 16 additions and 86 deletions.
  1. +8 −10 Dockerfile
  2. +3 −6 README.rst
  3. +1 −1 conf.py
  4. +0 −21 pequod-bootstrap.yaml
  5. +0 −13 pequod.xml
  6. +1 −7 run.sh
  7. +0 −25 serve.py
  8. +3 −3 themes/base-jinja/templates/list.tmpl
@@ -1,17 +1,15 @@
FROM hjacobs/nikola
FROM alpine:3.8

# CherryPy is used to serve the static HTML (not optimal, I know)
RUN pip3 install CherryPy==3.6.0
# copied from https://github.com/draga79/nikola/blob/alpine/Dockerfile
RUN apk --no-cache add python3 python3-dev alpine-sdk libxml2 py3-lxml zlib-dev libjpeg jpeg-dev && pip3 install -U pip setuptools wheel

RUN pip3 install Nikola[Extras] && rm -Rf /root/.cache/

# the main Bash loop
ADD run.sh /

# the CherryPy server app
ADD serve.py /

# the Pequod application manifest
ADD pequod.xml /

EXPOSE 8000

ENTRYPOINT ["/run.sh"]
WORKDIR /workdir

CMD ["/run.sh"]
@@ -4,12 +4,9 @@ srcco.de

.. code-block:: bash
$ docker run -u $(id -u) -v $(pwd):/workdir -t hjacobs/nikola build
$ docker build -t hjacobs/srcco.de .
$ docker run -u $(id -u) -v $(pwd):/workdir -t hjacobs/srcco.de nikola build
$ xdg-open output/index.html
Install required tools:

.. code-block:: bash
$ sudo apt-get install yui-compressor jpegoptim optipng
@@ -428,7 +428,7 @@ def compress_whitespace(x):
# This can be disabled on a per-page/post basis by adding
# .. pretty_url: False
# to the metadata
# PRETTY_URLS = False
PRETTY_URLS = False

# If True, publish future dated posts right away instead of scheduling them.
# Defaults to False.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
8 run.sh
@@ -1,14 +1,8 @@
#!/bin/bash

# Main bash loop to serve srcco.de
# see http://srcco.de/posts/docker-with-ipv6-and-resource-isolation.html
#!/bin/sh

echo 'Sleeping 10s..'
sleep 10

echo 'Starting CherryPy HTTP server..'
/serve.py srcco.de/output/ &

while true; do
echo 'Cloning git repo..'
git clone https://github.com/hjacobs/srcco.de.git

This file was deleted.

Oops, something went wrong.
@@ -5,10 +5,10 @@
<div class="postbox">
<h1>{{ title }}</h1>
<ul class="unstyled">
{% for text, link in items %}
<li><a href="{{ link }}">{{ text }}</a>
{% for text, link, count in items %}
<li><a href="{{ link }}">{{ text }}</a> ({{count}})</li>
{% endfor %}
</ul>
</div>
<!--End of body content-->
{% endblock %}
{% endblock %}

0 comments on commit 9b47e8b

Please sign in to comment.