-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mhanberry1/master
Added Docker Build Functionality
- Loading branch information
Showing
9 changed files
with
53 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Binary file not shown.