Skip to content

Commit

Permalink
Add codes
Browse files Browse the repository at this point in the history
  • Loading branch information
cuigh committed Dec 28, 2017
1 parent 2d51d09 commit 496f37a
Show file tree
Hide file tree
Showing 35 changed files with 49,349 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.js linguist-language=Go
*.css linguist-language=Go
*.html linguist-language=Go
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Created by .ignore support plugin (hsz.mobi)
### Go template
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

.vscode
.idea
vendor

# debug files
/debug
/xdoc
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:alpine AS build
WORKDIR /go/src/github.com/cuigh/xdoc/
ADD . .
RUN dep ensure
RUN go build -ldflags "-s -w"

FROM alpine:3.6
LABEL maintainer="[email protected]"
ENV XDOC_DIR /docs
WORKDIR /app
COPY --from=build /go/src/github.com/cuigh/xdoc/xdoc .
COPY --from=build /go/src/github.com/cuigh/xdoc/config ./config/
COPY --from=build /go/src/github.com/cuigh/xdoc/assets ./assets/
COPY --from=build /go/src/github.com/cuigh/xdoc/views ./views/
EXPOSE 8000
ENTRYPOINT ["/app/xdoc"]
33 changes: 33 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[constraint]]
branch = "master"
name = "github.com/cuigh/auxo"

[[constraint]]
name = "github.com/russross/blackfriday"
version = "2.0.0"
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# xdoc

A document site based Markdown.

## Usage

### Standalone

```bash
xdoc -d /docs
```

### Docker

First you need create a new docker image base on `cuigh/xdoc`, copy all your documents to `/docs` directory in image. Here is the sample **Dockerfile** file.

```docker
FROM cuigh/xdoc
COPY . /docs/
```

Build the image

```bash
docker build -t docs .
```

Start the container

```bash
docker run -it -p 8000:8000 docs
```
Loading

0 comments on commit 496f37a

Please sign in to comment.