Environment/docker (#681)

* create dockerfile

* create docker compose file

* update readme with docker setup guide
This commit is contained in:
Ahmed Nour Eldin 2022-07-17 00:51:50 +02:00 committed by GitHub
parent 27b8e8761d
commit 4d0ee00404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM alpine:3.14
RUN apk update && apk add py3-pip
COPY requirements.txt .
RUN pip install -r requirements.txt
WORKDIR /docs
EXPOSE 8000
CMD [ "mkdocs","serve","-a","0.0.0.0:8000"]

View File

@ -2,6 +2,21 @@
Read the docs at [docs.vapor.codes](https://docs.vapor.codes)
# Start with Docker
* Prerequisite for this setup, you must have docker and docker compose installed on the system
1. first clone the repo
2. then run
```
docker compose up
```
3. then open from the browser on the port 8000
e.g.
```
http://127.0.1.1:8000
```
## Contributing
If you want to add information to the docs or have found any mistakes you wish to fix, feel free to create a PR for the change.

11
docker-compose.yaml Normal file
View File

@ -0,0 +1,11 @@
services:
docs:
build: ./
image: vapor/docs
container_name: vapor-docs
ports:
- "8000:8000"
volumes:
- type: bind
source: ./
target: /docs