Skip to content

Commit

Permalink
Merge pull request #1 from mhanberry1/master
Browse files Browse the repository at this point in the history
Added Docker Build Functionality
  • Loading branch information
fangohr authored Dec 22, 2019
2 parents f4f34d3 + 8a8b9bb commit d252df4
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 42 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from alpine

add . /nmag-www
workdir /nmag-www

# Install dependencies
run apk --no-cache add make bash python py2-pip rsync
run pip install docutils

# Extract and link r2w
run tar xzvf rest2web-0.5.1.tar.gz
run chmod 755 rest2web-0.5.1/r2w.py
run ln -s /nmag-www/rest2web-0.5.1/r2w.py /bin/r2w

# Compile the docs
run make
8 changes: 0 additions & 8 deletions README

This file was deleted.

21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# About

This repository stores the code used to build the nmag website only.
The documentation is built from http://github.com/fangohr/nmag-doc.

# Build Using Docker

1. Install docker from [docker.com](https://docs.docker.com/v17.09/engine/installation/#supported-platforms)
2. Run `build.sh`
3. Upon completion, the 'output' directory will contain the webroot for the site

# Build Natively

To build these webpages, you need r2w in your path
(http://www.voidspace.org.uk/python/rest2web/).

This is also available as a debian package 'rest2web'.

Just type 'make', and wait.

The html-root is produced in the 'output' directory.
12 changes: 12 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Exit the script if a command fails
set -e

# Build the container image
docker build -t nmag-www .

# Copy the output directory from the container
docker create -it --name nmag-www-temp nmag-www
docker cp nmag-www-temp:/nmag-www/output .
docker rm -f nmag-www-temp
6 changes: 2 additions & 4 deletions input/0.2/manual.txt → input/0.2/manualhtml.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
restindex
crumb: Manual (split html files)
crumb: Manual (html)
format: rest
page-title: Nmag 0.2 Manual (html)
include: Yes
page-description:
Nmag Manual (html)
/description
build: No
target: manual/html/manual.html
target: http://nmag.readthedocs.io
/restindex


13 changes: 0 additions & 13 deletions input/0.2/manualsingl.txt

This file was deleted.

6 changes: 2 additions & 4 deletions input/manual.txt → input/manualhtml.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
restindex
crumb: Manual (split html files)
crumb: Manual (html)
format: rest
page-title: Nmag 0.2 Manual (html)
include: Yes
page-description:
Nmag Manual (html)
/description
build: No
target: current/manual/html/manual.html
target: http://nmag.readthedocs.io
/restindex


13 changes: 0 additions & 13 deletions input/manualsingl.txt

This file was deleted.

Binary file added rest2web-0.5.1.tar.gz
Binary file not shown.

0 comments on commit d252df4

Please sign in to comment.