Merge pull request #1001 from SvenDowideit/build-docs-in-local-fig-repo

add ./script/doc to build fig documentation using the docs.docker.com to...
This commit is contained in:
Ben Firshman 2015-02-23 22:45:59 +00:00
commit a42f2007ea
11 changed files with 44 additions and 11 deletions

15
docs/Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM docs/base:latest
MAINTAINER Sven Dowideit <SvenDowideit@docker.com> (@SvenDowideit)
# to get the git info for this repo
COPY . /src
# Reset the /docs dir so we can replace the theme meta with the new repo's git info
RUN git reset --hard
RUN grep "__version" /src/compose/__init__.py | sed "s/.*'\(.*\)'/\1/" > /docs/VERSION
COPY docs/* /docs/sources/compose/
COPY docs/mkdocs.yml /docs/mkdocs-compose.yml
# Then build everything together, ready for mkdocs
RUN /docs/build.sh

View File

@ -172,9 +172,9 @@ the daemon.
Configures the path to the `ca.pem`, `cert.pem`, and `key.pem` files used for TLS verification. Defaults to `~/.docker`.
## Compose Docs
## Compose Documentation
[Installing Compose](http://docs.docker.com/compose/install)
[Intro & Overview]((http://docs.docker.com/compose/userguide)
[Yaml file reference]((http://docs.docker.com/compose/yml)
- [Installing Compose](install.md)
- [Intro & Overview](index.md)
- [Yaml file reference](yml.md)

View File

@ -6,7 +6,7 @@ title: Getting started with Compose and Django
Getting started with Compose and Django
===================================
Let's use Compose to set up and run a Django/PostgreSQL app. Before starting, you'll need to have [Compose installed](install.html).
Let's use Compose to set up and run a Django/PostgreSQL app. Before starting, you'll need to have [Compose installed](install.md).
Let's set up the three files that'll get us started. First, our app is going to be running inside a Docker container which contains all of its dependencies. We can define what goes inside that Docker container using a file called `Dockerfile`. It'll contain this to start with:

View File

@ -6,7 +6,7 @@ title: Compose environment variables reference
Environment variables reference
===============================
**Note:** Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, the name of the linked service) as the hostname to connect to. See the [docker-compose.yml documentation](yml.html#links) for details.
**Note:** Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, the name of the linked service) as the hostname to connect to. See the [docker-compose.yml documentation](yml.md#links) for details.
Compose uses [Docker links] to expose services' containers to one another. Each linked container injects a set of environment variables, each of which begins with the uppercase name of the container.

View File

@ -60,7 +60,7 @@ Python.
### Installation and set-up
First, [install Docker and Compose](install.html).
First, [install Docker and Compose](install.md).
Next, you'll want to make a directory for the project:

View File

@ -32,7 +32,7 @@ To install Compose, run the following commands:
curl -L https://github.com/docker/docker-compose/releases/download/1.1.0-rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Optionally, you can also install [command completion](completion.html) for the
Optionally, you can also install [command completion](completion.md) for the
bash shell.
Compose is available for OS X and 64-bit Linux. If you're on another platform,

7
docs/mkdocs.yml Normal file
View File

@ -0,0 +1,7 @@
- ['compose/index.md', 'User Guide', 'Docker Compose' ]
- ['compose/install.md', 'Installation', 'Docker Compose']
- ['compose/cli.md', 'Reference', 'Compose command line']
- ['compose/yml.md', 'Reference', 'Compose yml']
- ['compose/env.md', 'Reference', 'Compose ENV variables']
- ['compose/completion.md', 'Reference', 'Compose commandline completion']

View File

@ -6,7 +6,7 @@ title: Getting started with Compose and Rails
Getting started with Compose and Rails
==================================
We're going to use Compose to set up and run a Rails/PostgreSQL app. Before starting, you'll need to have [Compose installed](install.html).
We're going to use Compose to set up and run a Rails/PostgreSQL app. Before starting, you'll need to have [Compose installed](install.md).
Let's set up the three files that'll get us started. First, our app is going to be running inside a Docker container which contains all of its dependencies. We can define what goes inside that Docker container using a file called `Dockerfile`. It'll contain this to start with:

View File

@ -6,7 +6,7 @@ title: Getting started with Compose and Wordpress
Getting started with Compose and Wordpress
======================================
Compose makes it nice and easy to run Wordpress in an isolated environment. [Install Compose](install.html), then download Wordpress into the current directory:
Compose makes it nice and easy to run Wordpress in an isolated environment. [Install Compose](install.md), then download Wordpress into the current directory:
$ curl https://wordpress.org/latest.tar.gz | tar -xvzf -

View File

@ -68,7 +68,7 @@ for this service, e.g:
```
Environment variables will also be created - see the [environment variable
reference](env.html) for details.
reference](env.md) for details.
### external_links

11
script/docs Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
set -ex
# import the existing docs build cmds from docker/docker
DOCSPORT=8000
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
DOCKER_DOCS_IMAGE="compose-docs$GIT_BRANCH"
DOCKER_RUN_DOCS="docker run --rm -it -e NOCACHE"
docker build -t "$DOCKER_DOCS_IMAGE" -f docs/Dockerfile .
$DOCKER_RUN_DOCS -p $DOCSPORT:8000 "$DOCKER_DOCS_IMAGE" mkdocs serve