Skip to content

Commit

Permalink
Update offline read
Browse files Browse the repository at this point in the history
Update offline read  (yeasy#312)
  • Loading branch information
khs1994 committed Jan 23, 2018
1 parent 4667ffb commit 81ec719
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ script:
- docker run -it --rm -v $PWD:/srv/gitbook-src yeasy/docker_practice build
after_success:
- sudo chmod -R 777 _book
- echo "FROM nginx:alpine" >> Dockerfile
- echo "COPY _book /usr/share/nginx/html" >> Dockerfile
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker build -t dockerpracticecn/docker_practice .
- docker run -dit --rm -p 4000:80 dockerpracticecn/docker_practice
- sleep 5
- curl 127.0.0.1:4000
- docker push dockerpracticecn/docker_practice
- cd _book
- git init
- git remote add origin "$REPO"
Expand Down
22 changes: 0 additions & 22 deletions bin/offline

This file was deleted.

23 changes: 15 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version: "3"
services:

# $ docker-compose up server => up a server,Only Support Linux or macOS

server:
image: yeasy/docker_practice:latest
ports:
Expand All @@ -9,21 +11,26 @@ services:
- ./:/srv/gitbook-src
command: server

windows:
image: nginx:alpine
volumes:
- ./:/srv/www
- .travis/conf.d:/etc/nginx/conf.d
ports:
- 4000:4000
command: ["nginx", "-c", "/etc/nginx/conf.d/nginx.conf", "-g", "daemon off;"]
# $ docker-compose up build => build gitbook

build:
image: yeasy/docker_practice:latest
volumes:
- ./:/srv/gitbook-src
command: build

# $ docker run -it --rm -p 4000:80 dockerpracticecn/docker_practice

# $ docker up offline

offline:
# this image build by travis ci
image: dockerpracticecn/docker_practice
ports:
- 4000:80

# developer test docker image

development:
build: ./.travis
image: yeasy/docker_practice:latest
Expand Down

0 comments on commit 81ec719

Please sign in to comment.