Skip to content

Commit d2ad246

Browse files
author
Jason Hansen
committed
Merge pull request #42 from slack/docker-serve
Update README and interactive Docker serve
2 parents 7104eaf + 238f969 commit d2ad246

3 files changed

Lines changed: 36 additions & 46 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ WORKDIR /app
66
RUN pip install -r requirements.txt
77

88
EXPOSE 8000
9-
CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
9+
ENTRYPOINT ["mkdocs", "serve", "-a", "0.0.0.0:8000"]

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,25 @@ BUILDDIR = _build
66
MKDOCS = mkdocs
77
MKDOCSBUILDOPTS = --clean --strict --verbose
88
MKDOCSBUILD = $(MKDOCS) build $(MKDOCSBUILDOPTS)
9+
MKDOCSSERVE = $(MKDOCS) serve -a 0.0.0.0:8000
10+
11+
SHORT_NAME ?= docs-v2
12+
VERSION ?= git-$(shell git rev-parse --short HEAD)
13+
IMAGE := ${SHORT_NAME}:${VERSION}
14+
15+
REPO_PATH := github.com/deis/${SHORT_NAME}
16+
DEV_ENV_WORK_DIR := /src/${REPO_PATH}
17+
DEV_ENV_PREFIX := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} -p 8000:8000
18+
DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
919

1020
build:
1121
$(MKDOCSBUILD) --site-dir $(BUILDDIR)/html
1222
@echo
1323
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
1424

25+
serve:
26+
$(MKDOCSSERVE)
27+
1528
clean:
1629
rm -rf $(BUILDDIR)/*
1730

@@ -22,3 +35,9 @@ test: build
2235
grep -q '<h1 id="welcome">Welcome</h1>' _build/html/index.html
2336
@echo
2437
@echo "Test finished. The HTML pages are in $(BUILDDIR)/html."
38+
39+
docker-build:
40+
docker build --rm -t ${IMAGE} .
41+
42+
docker-serve:
43+
${DEV_ENV_CMD} ${IMAGE}

README.md

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,36 @@
1-
# Deis Workflow v2
1+
# Deis Workflow Documentation
22

3-
[![Build Status](https://travis-ci.org/deis/workflow.svg?branch=master)](https://travis-ci.org/deis/workflow) [![Go Report Card](http://goreportcard.com/badge/deis/workflow)](http://goreportcard.com/report/deis/workflow)
3+
## About
44

55
Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage
66
applications on your own servers. Deis builds on [Kubernetes](http://kubernetes.io/) to provide
77
a lightweight, [Heroku-inspired](http://heroku.com) workflow.
88

9-
## Work in Progress
9+
This repository represents the documentation for Deis Workflow which is the
10+
second major release of the Platform.
1011

11-
![Deis Graphic](https://s3-us-west-2.amazonaws.com/get-deis/deis-graphic-small.png)
12+
## Requirements
1213

13-
Deis Workflow v2 is currently in alpha. Your feedback and participation are more than welcome, but be
14-
aware that this project is considered a work in progress.
14+
The documentation site requires either a local installation of [MkDocs][] or
15+
access to Docker.
1516

16-
The following features are not ready in Alpha1, but will be coming
17-
soon.
17+
### Local Installation
1818

19-
- Complete SSL support
20-
- Dockerfile builds
21-
- Backup and restore features
22-
- Persistent storage (though it can be manually configured)
19+
Install [MkDocs][] and required dependencies:
2320

24-
## Hacking Workflow
25-
26-
First, [obtain a Kubernetes cluster][install-k8s]. Deis Workflow currently targets Kubernetes
27-
v1.1 with the following requirements:
28-
29-
* Configure Docker's `insecure-registry` parameter to include the subnets used by your Kubernetes installation
30-
* If you are testing the logger components, you must enable `DaemonSet` experimental APIs via `--runtime-config=extensions/v1beta1/daemonsets=true`
31-
32-
Next, install [helm](http://helm.sh). Next, add the deis repository to your chart list:
33-
34-
```console
35-
$ helm repo add deis https://github.com/deis/charts
3621
```
37-
38-
Then, install Deis!
39-
40-
```console
41-
$ helm install deis/deis
22+
make deps
4223
```
4324

44-
Complete instructions for installing and managing a Deis cluster are
45-
available in the [docs folder](https://github.com/deis/workflow/tree/master/docs/src).
46-
47-
If you want to retrieve the latest client dev build for OS X or Linux, download the client:
25+
## Building Documentation
4826

49-
```console
50-
$ curl -sSL http://deis.io/deis-cli/install-v2-alpha.sh | bash
51-
```
27+
To build the documentation run: `make build` or `make docker-build`
5228

53-
If you want to hack on a new feature, build the deis/workflow image and push it to a Docker
54-
registry. The `$DEIS_REGISTRY` environment variable must point to a registry accessible to your
55-
Kubernetes cluster. You may need to configure the Docker engines on your Kubernetes nodes to allow
56-
`--insecure-registry 192.168.0.0/16` (or the appropriate address range).
29+
## Serve Documentation
5730

58-
```console
59-
$ make docker-build docker-push
60-
```
31+
To serve documenation run: `make serve` or `make docker-serve`
6132

62-
You'll want to modify the deis chart to use your custom image, then run `helm install` on the
63-
chart.
33+
Then view the documentation on [http://localhost:8000](http://localhost:8000) or `http://DOCKER_IP:8000`.
6434

6535
## License
6636

@@ -72,3 +42,4 @@ Unless required by applicable law or agreed to in writing, software distributed
7242

7343

7444
[install-k8s]: http://kubernetes.io/gettingstarted/
45+
[mkdocs]: http://www.mkdocs.org/

0 commit comments

Comments
 (0)