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

Added docs to docker build #61

Merged
merged 2 commits into from
Sep 11, 2020
Merged
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
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ FROM python:3.6-alpine AS production
RUN apk --no-cache add \
ca-certificates \
mailcap \
make \
musl \
pcre \
postgresql \
Expand All @@ -80,6 +81,7 @@ RUN apk --no-cache add \

COPY --from=build /usr/local/lib/python3.6 /usr/local/lib/python3.6
COPY --from=build /usr/local/bin/uwsgi /usr/local/bin/uwsgi
COPY --from=build /usr/local/bin/sphinx-build /usr/local/bin/sphinx-build
# required for swagger2openapi conversion
COPY --from=frontend-build /app/node_modules /app/node_modules

Expand All @@ -91,11 +93,15 @@ RUN mkdir /app/log
COPY --from=frontend-build /app/src/brc/static/fonts /app/src/brc/static/fonts
COPY --from=frontend-build /app/src/brc/static/css /app/src/brc/static/css
COPY ./src /app/src
COPY ./docs /app/docs

ENV DJANGO_SETTINGS_MODULE=brc.conf.docker

ARG SECRET_KEY=dummy

# build docs
RUN make -C docs html

# Run collectstatic, so the result is already included in the image
RUN python src/manage.py collectstatic --noinput

Expand Down
1 change: 1 addition & 0 deletions bin/docker_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ uwsgi \
--module brc.wsgi \
--static-map /static=/app/static \
--static-map /media=/app/media \
--static-map /_docs=/app/docs/_build/html \
--chdir src \
--processes 2 \
--threads 2 \
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

sys.path.insert(0, os.path.abspath('../src'))

os.environ['DJANGO_SETTINGS_MODULE'] = 'brc.conf.dev'
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'drc.conf.dev')

django.setup()

Expand Down
9 changes: 3 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --no-index requirements/base.in
# pip-compile --no-index --output-file requirements/base.txt requirements/base.in
#
alabaster==0.7.12 # via sphinx
babel==2.6.0 # via sphinx
Expand Down Expand Up @@ -33,9 +33,9 @@ inflection==0.3.1 # via drf-yasg
iso-639==0.4.5 # via vng-api-common
isodate==0.6.0 # via vng-api-common
itypes==1.1.0 # via coreapi
jinja2==2.10.1 # via coreschema, sphinx
jinja2==2.11.2 # via coreschema, sphinx
markdown==3.1
markupsafe==1.0 # via jinja2
markupsafe==1.1.1 # via jinja2
oyaml==0.7 # via vng-api-common
packaging==19.0 # via sphinx
pillow==5.2.0
Expand All @@ -62,6 +62,3 @@ unidecode==1.0.22 # via vng-api-common
uritemplate==3.0.0 # via coreapi, drf-yasg
urllib3==1.24.3 # via requests
vng-api-common==1.0.34

# The following packages are considered to be unsafe in a requirements file:
# setuptools==42.0.2 # via markdown, sphinx
9 changes: 3 additions & 6 deletions requirements/jenkins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --no-index --output-file=requirements/jenkins.txt requirements/base.txt requirements/jenkins.in requirements/testing.in
# pip-compile --no-index --output-file requirements/jenkins.txt requirements/base.txt requirements/testing.in requirements/jenkins.in
#
alabaster==0.7.12
astroid==1.6.5 # via pylint
Expand Down Expand Up @@ -40,10 +40,10 @@ iso-639==0.4.5
isodate==0.6.0
isort==4.3.4
itypes==1.1.0
jinja2==2.10.1
jinja2==2.11.2
lazy-object-proxy==1.3.1 # via astroid
markdown==3.1
markupsafe==1.0
markupsafe==1.1.1
mccabe==0.6.1 # via pylint
oyaml==0.7
packaging==19.0
Expand Down Expand Up @@ -77,6 +77,3 @@ uritemplate==3.0.0
urllib3==1.24.3
vng-api-common==1.0.34
wrapt==1.10.11 # via astroid

# The following packages are considered to be unsafe in a requirements file:
# setuptools==42.0.2 # via markdown, sphinx