Commit 153221d5 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Merge branch 'wip-docs' into 'master'

build the doc

See merge request !42
parents 73703f8f 25cf184b
Pipeline #83583 passed with stages
in 14 minutes and 28 seconds
......@@ -78,9 +78,25 @@ pages:
stage: deploy
dependencies:
- test-pg
services:
- registry-gitlab.pasteur.fr/dsi-tools/docker-images/docker:dind
script:
- mv ippisite/htmlcov public/
- mv ippisite/docs/build/html/ public/
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
# pull the latest build on this branch
- docker pull "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG/web-container:latest" || true
# build the image while passing commit SHA and tagging the image with it
- cd ippisite
- docker build
--target docs-container
--build-arg CI_COMMIT_REF_SLUG
--build-arg CI_COMMIT_SHA
--cache-from "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG/web-container:latest"
--tag ippidb_docs
.
- mkdir build/
- docker run -v $(pwd)/build/:/code/docs/build/ ippidb_docs
- mv build/html/ ../public/
- mv ../htmlcov ../public/
artifacts:
paths:
- public
......@@ -237,4 +253,4 @@ delete-dev-deployment:
script:
- echo "Removing $CI_COMMIT_REF_SLUG"
- helm delete -n ${NAMESPACE} ${CI_COMMIT_REF_SLUG}
- kubectl delete pvc -n ${NAMESPACE} -lapp.kubernetes.io/instance=${CI_COMMIT_REF_SLUG}
\ No newline at end of file
- kubectl delete pvc -n ${NAMESPACE} -lapp.kubernetes.io/instance=${CI_COMMIT_REF_SLUG}
......@@ -9,6 +9,6 @@ ippidb.json
ippidb.json.gz
db.json
db.sql.gz
db-django-4.0.sql.gz
db*.sql.gz
persistent/media/*
# END OF FILE
\ No newline at end of file
###############################################################################
# BAse image containing libs, dependencies and code
# Base image containing libs, dependencies
###############################################################################
FROM python:3.9 AS base-container
FROM python:3.9 AS base-container-without-sources
EXPOSE 8000
ENV PYTHONPATH "${PYTHONPATH}:/usr/lib/python3/dist-packages"
......@@ -16,6 +16,7 @@ RUN addgroup --gid 1000 kiwi \
gettext \
python3-dev \
python3-openbabel \
graphviz-dev \
&& rm -rf /var/lib/apt/lists/* \
&& python -m pip install --upgrade pip setuptools \
&& mkdir /code
......@@ -28,8 +29,13 @@ RUN pip install -r requirements.txt
COPY ./*-entrypoint.sh /
RUN chmod a+x /*-entrypoint.sh
COPY . /code/
###############################################################################
# Base image plus the sources
###############################################################################
FROM base-container-without-sources AS base-container
COPY . /code/
###############################################################################
# django web app
......@@ -57,4 +63,22 @@ ENTRYPOINT ["/docker-celery-entrypoint.sh"]
CMD ["celery", "-A", "ippisite", "worker", "-l", "info", "--concurrency", "2"]
USER kiwi
\ No newline at end of file
USER kiwi
###############################################################################
# build the docs
###############################################################################
FROM base-container-without-sources AS docs-container
ENV USE_SQLITE_AS_DB True
COPY requirements*.txt /code/
RUN pip install -r requirements-dev.txt \
&& mkdir -p /root/.config/bioservices
CMD ["make", "html" ]
COPY . /code/
WORKDIR /code/docs
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment