Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
Make it more obvious you don't need to build the image.  Update the
argument documentaion to be more accurate.  Improve the contribution
documentation.
  • Loading branch information
spjmurray committed Oct 4, 2018
1 parent 998ad71 commit 96cf470
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,29 @@ https://travis-ci.org/spjmurray/couchbase-antora-preview[image:https://travis-ci
Simple container which automates the installation of Antora, compilation of Couchbase
documentation for a single repository and display via a web server.

== Installation
== Quick Start

=== Pre-requisites

Ensure the following commands are installed and in your path:

* make
* docker

=== Creating the container image

Simply (for Richard Smedley) run the following:

[source,console]
----
make
----

== Execution

A typical execution of the container will look like the following:
A typical execution of the container will look like the following, the container image is in docker hub so will just work without having to build the container manually:

[source,console]
----
docker run --rm -ti \
--publish 8080:80 \
--mount type=bind,source=/home/simon/go/src/github.com/couchbase/couchbase-operator,target=/src,readonly \
spjmurray/couchbase-antora-preview:1.1.0 \
--port 8080 \
--repo url=/src,branches=master:1.0.x,start_path=docs/user
----

At present all arguments are required, however certain arguments may be modified to suit your particular Antora module.
=== Container Arguments

--rm::
Removes the container once execution has terminated.

-ti::
Allocate a pseudo terminal and allow input.
Allocate a pseudo terminal and allow input. This field is required to provide an interactive session.

--publish 8080:80::
Bind unprivileged port 8080 on the host system to port 80 on the container. By default the static content will be generated with this port. If you wish to use a different host port please specify the `--port` argument to the container entry point.
Bind unprivileged port 8080 on the host system to port 80 on the container. By default the static content will be generated with this port. If you wish to use a different host port please specify the `--port` argument to the container entry point. This argument is required to expose the HTTP service.

--mount type=bind,source=/home/simon/go/src/github.com/couchbase/couchbase-operator,target=/src,readonly::
Mounts your AsciiDoc repository in the container. This must be a Git repository containing at least one Antora module. Mounts can be placed where you like and may be refered to by the `--repo` argument of the container.
Expand All @@ -61,3 +42,23 @@ The host port mapping to the container web server. This argument is optional an
This argument is passed to the container entry point. This specifies a repository to be added to the Antora playbook. The `url` parameter is required and specifies the path to a mounted git repository or a reference to github. The `branches` parameter is optional and specifies which branches to use for document generation. The `start_path` parameter is used to select the path within the repository to find the `antora.yml` module configuration. For further details please consult the https://docs.antora.org/antora/1.1/playbook/configure-content-sources/[Antora documentation].

NOTE: The container runs in an interactive shell, to stop execution simply press `Ctl+C`

== Contributing

Pull requests are welcomed, as are issues via github.

=== Build Pre-requisites

Ensure the following commands are installed and in your path:

* make
* docker

=== Creating the container image

Simply (for Richard Smedley) run the following:

[source,console]
----
make
----

0 comments on commit 96cf470

Please sign in to comment.