Skip to content

Commit

Permalink
[documdocs: deploy docsify in docker. (#1241)
Browse files Browse the repository at this point in the history
* [documentation deploy] deploy docsify in docker.

* [remove] remove unnecessary content.

* [change] remove outbox resource link.

* [refine] refine description.

Co-authored-by: Anix <anik220798@gmail.com>
  • Loading branch information
Koooooo-7 and anikethsaha committed Jun 23, 2020
1 parent c3d0d0d commit 4b02177
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions docs/deploy.md
Expand Up @@ -135,3 +135,49 @@ frontend:
| /<*>.md | /<*>.md | 200 (Rewrite) |
| /<*>.png | /<*>.png | 200 (Rewrite) |
| /<*> | /index.html | 200 (Rewrite) |


## Docker

- Create docsify files

You need prepare the initial files instead of making in container.
See the [Quickstart](https://docsify.js.org/#/quickstart) section for instructions on how to create these files manually or using [docsify-cli](https://github.com/docsifyjs/docsify-cli).

```sh
index.html
README.md
```

- Create dockerfile

```Dockerfile
FROM node:latest
LABEL description="A demo Dockerfile for build Docsify."
WORKDIR /docs
RUN npm install -g docsify-cli@latest
EXPOSE 3000/tcp
ENTRYPOINT docsify serve .

```

So, current directory structure should be this:

```sh
index.html
README.md
Dockerfile
```

- Build docker image

```sh
docker build -f Dockerfile -t docsify/demo .
```

- Run docker image

```sh
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
```

1 comment on commit 4b02177

@vercel
Copy link

@vercel vercel bot commented on 4b02177 Jun 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.