Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: asoul-sig/asouldocs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: dockerclubgroup/peach
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 11 commits
  • 4 files changed
  • 2 contributors

Commits on Mar 10, 2016

  1. 修改google字体,采用国内源

    忽略custom、Godeps目录
    cncodog committed Mar 10, 2016
    Copy the full SHA
    11e4006 View commit details
  2. Copy the full SHA
    e25b503 View commit details

Commits on Mar 11, 2016

  1. Copy the full SHA
    a988d2f View commit details
  2. Copy the full SHA
    605a14c View commit details
  3. 修正ci不能通过的问题

    cncodog committed Mar 11, 2016
    Copy the full SHA
    d9d1e09 View commit details
  4. 修正ci不能通过的问题

    cncodog committed Mar 11, 2016
    Copy the full SHA
    5e58af5 View commit details
  5. 1、调整Makefile Dockerfile文件

    2、还原semantic.min.css
    3、增加ReadMe
    cncodog committed Mar 11, 2016
    Copy the full SHA
    0bf96e5 View commit details
  6. Update README.md

    修改Read格式
    dockerclub committed Mar 11, 2016
    Copy the full SHA
    df232eb View commit details
  7. Copy the full SHA
    f5bfa84 View commit details

Commits on Mar 16, 2016

  1. 更新docker容器镜像,采用alpine镜像。

    go环境采用安装模式
    cncodog committed Mar 16, 2016
    Copy the full SHA
    bcae88d View commit details
  2. 更新docker容器镜像,采用alpine镜像。

    go环境采用安装模式
    cncodog committed Mar 16, 2016
    Copy the full SHA
    585f7b4 View commit details
Showing with 136 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +45 −0 Dockerfile
  3. +47 −0 Makefile
  4. +42 −0 docker/README.md
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -27,3 +27,5 @@ peach.sublime-project
peach
custom*
data
.idea*
Godeps*
45 changes: 45 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Go Dockerfile
#
# https://github.com/peachdocs/peach
#

# Pull base image.
FROM alpine:latest


RUN apk update && apk add curl git mercurial bzr go && rm -rf /var/cache/apk/*



# Set environment variables.
ENV GOROOT /usr/lib/go
ENV GOPATH /gopath
ENV PATH $GOROOT/bin:$GOPATH/bin:$PATH


#Copy sourcecode for build
COPY . ${GOPATH}/src/github.com/peachdocs/peach

# Build peach for golang
RUN cd ${GOPATH}/src/github.com/peachdocs/peach && go get
RUN cd ${GOPATH}/src/github.com/peachdocs/peach && go build .


# Define working directory.
WORKDIR /app

RUN rm -rf /app/* && cp -r -f ${GOPATH}/src/github.com/peachdocs/peach/* /app

RUN rm -rf ${GOPATH}
# Define mountable directories.
VOLUME ["/app/custom"]



# Define default command.
CMD ["/app/peach"]


# Expose ports.
EXPOSE 5556
47 changes: 47 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# this a peach build script
CGO_ENABLED=0
GOOS=linux
GOARCH=amd64

TAG=${TAG:-latest}
COMMIT=`git rev-parse --short HEAD`

PERACH_PORT=${PERACH_PORT:-5556}
PERACH_CUSTOM_PATH=${PERACH_CUSTOM_PATH:-/app/custom}


all: clean init build

clean:
@rm -rf ./peach

build:
@go get && go build .

init:
@git clone https://github.com/peachdocs/peach.peach custom


image:
@ echo Building peach image $(TAG)
@ docker build -t peachdocs/peach:$(TAG) .

release: build image
@docker push peachdocs/peach:$(TAG) .

test: clean
@go test -v ./...

testbuild:
@go build


testrun:
@ ./peach web


dockerrun:
@ docker run -ti -d -p ${PERACH_PORT}:5556 --restart=always --name peach -v ${PERACH_CUSTOM_PATH}:/app/custom dockerclub/peach /app/peach web


.PHONY: all build clean image test release
42 changes: 42 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

# Docker for peach

Visit [Docker Hub](https://hub.docker.com/r/peachdocs/peach/) see all available tags.

## Usage

To keep your data out of Docker container, we do a volume (`/app/custom` -> `/custom`) here, and you can change it based on your situation.

```
# Pull image from Docker Hub.
$ docker pull peachdocs/peach
# Create local directory for volume.
$ mkdir -p /custom
# Use `make dockerrun` or `docker run` for the first time.
$ make dockerrun PERACH_PORT={YOUR HOST PORT} PERACH_CUSTOM_PATH=/custom
or
$docker run -ti -d -p {YOUR HOST PORT}:5556 --restart=always --entrypoint="/bin/bash" --name peach -v /custom:/app/custom peachdocs/peach /app/peach web
```
## About make command


```
# local build peach
$ make all
## local test run peach application
$ make testrun
## make a peach docker image
$ make image
## push a peach docker image to docker hub
$ make release
```