Skip to content

Commit

Permalink
add Docker and docker manual
Browse files Browse the repository at this point in the history
  • Loading branch information
pkucmus committed Dec 31, 2021
1 parent baf16cd commit 0b5d023
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM python:3.10.1-alpine3.15

RUN apk add --no-cache \
bash \
curl \
git \
git-fast-import \
openssh \
rust \
cargo \
openssl-dev \
libffi-dev
RUN apk add --no-cache --virtual .build gcc musl-dev
ENV POETRY_VERSION=1.1.12
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python3 && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false

COPY poetry.lock pyproject.toml /app/
WORKDIR /app
RUN poetry install --no-root --no-dev --no-interaction --no-ansi

COPY mkdocs.yml /app/
COPY docs /app/docs/
COPY overrides /app/overrides/

CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,20 @@ Please note that all contributes are automatically subject to the terms of the [
Please! Share your candy!

![candy](docs/assets/candy_bowl.png)

## Local deployment

There are two options, either you have a local Python envorinment with `Python` and `Poetry` or you can use Docker - the latter is easier but will be troublesome on Windows (since Windows is troublesome).

To get Docker go to https://docs.docker.com/get-docker/ and proceed with the installation steps. Do not be affraid in case you see this as black magic, Docker is a tool that allowes to run a tiny version of a Linux system on Mac, Windows and Linux - that tindy system is isolated from your machine - it's like a sandbox for developers.

> Per the documentation:
> It remains free for small businesses (fewer than 250 employees AND less than $10 million in annual revenue), **personal use**, education, and **non-commercial open source projects**.
Once it's installed you can use Docker Compose to deploy your own private EVA contrib site that will be visible only to you, go ahead and experiment with it to make sure your changes work before making a pull request :)

```
docker-compose up
```

And your local site will be accessible on the 127.0.0.1 address with is the loopback address pointing to your own machine: http://127.0.0.1:62999 is the full address and port.
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.7"

services:
page:
build:
context: .
command: "mkdocs serve -a 0.0.0.0:8000"
volumes:
- "./docs/:/app/docs"
ports:
- 62999:8000

0 comments on commit 0b5d023

Please sign in to comment.