Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile to Jobbergate docs #243

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions jobbergate-docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM python:3.8-slim-buster AS builder

WORKDIR /app

RUN apt update && apt install -y curl make

RUN curl -sSL https://install.python-poetry.org | \
POETRY_HOME=/opt/poetry POETRY_VERSION=1.1.13 python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false

ADD jobbergate-docs /app/jobbergate-docs
ADD jobbergate-core /app/jobbergate-core

WORKDIR /app/jobbergate-docs

RUN make docs

FROM python:3.8-slim-buster AS final

COPY --from=builder /app/jobbergate-docs/build /app/build

CMD ["sh", "-c", "python -m http.server --bind 0.0.0.0 --directory /app/build 8887"]
11 changes: 9 additions & 2 deletions jobbergate-docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@ This repository contains the source for the Jobbergate Documentation page.
It is built using [sphinx](https://www.sphinx-doc.org/en/master/) to render the source into
a static website.

Build and instanciate the Docs server using Docker
==================================================

Build the Docs
==============
To build the documentation site and deploy the server in a determined PORT, run the following command from `jobbergate` root directory::

$ docker build -t jobbergate-docs -f jobbergate-docs/Dockerfile .
$ docker run -p <PORT>:8887 jobbergate-docs

Build the documentation static site
===================================

To build the documentation static site, run the following command::

Expand Down