Commit fff51f83 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'docs_sphinx' into 'master'

Docs Sphinx Dockerfile

See merge request !635
parents bc5388c0 112093bc
...@@ -19,8 +19,11 @@ CMD ["--help"] ...@@ -19,8 +19,11 @@ CMD ["--help"]
RUN mkdir /concrexit && \ RUN mkdir /concrexit && \
mkdir -p /concrexit/log/ && \ mkdir -p /concrexit/log/ && \
touch /concrexit/log/uwsgi.log && \ touch /concrexit/log/uwsgi.log && \
mkdir -p /concrexit/docs/ && \
chown -R www-data:www-data /concrexit && \ chown -R www-data:www-data /concrexit && \
mkdir -p /usr/src/app mkdir -p /usr/src/app && \
mkdir -p /usr/src/app/website && \
mkdir -p /usr/src/app/docs
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
...@@ -29,15 +32,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ...@@ -29,15 +32,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ghostscript && \ ghostscript && \
rm -rf /var/lib/apt rm -rf /var/lib/apt
WORKDIR /usr/src/app WORKDIR /usr/src/app/website/
# install python requirements # install python requirements
COPY requirements.txt /usr/src/app/ COPY requirements.txt /usr/src/app/website/
COPY production-requirements.txt /usr/src/app/ COPY production-requirements.txt /usr/src/app/website/
COPY dev-requirements.txt /usr/src/app/ COPY dev-requirements.txt /usr/src/app/website/
COPY docs/requirements.txt /usr/src/app/docs/
RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir \
-r requirements.txt \ -r requirements.txt \
-r production-requirements.txt \ -r production-requirements.txt \
-r dev-requirements.txt -r dev-requirements.txt \
-r ../docs/requirements.txt
# Create entry points # Create entry points
COPY resources/entrypoint.sh /usr/local/bin/entrypoint.sh COPY resources/entrypoint.sh /usr/local/bin/entrypoint.sh
...@@ -46,4 +51,8 @@ RUN chmod +x /usr/local/bin/entrypoint.sh && \ ...@@ -46,4 +51,8 @@ RUN chmod +x /usr/local/bin/entrypoint.sh && \
chmod +x /usr/local/bin/entrypoint_production.sh chmod +x /usr/local/bin/entrypoint_production.sh
# copy app source # copy app source
COPY website /usr/src/app/ COPY website /usr/src/app/website/
# Copy files for Sphinx documentation
COPY README.md /usr/src/app/
COPY docs /usr/src/app/docs
...@@ -32,21 +32,3 @@ mailinglists.models module ...@@ -32,21 +32,3 @@ mailinglists.models module
:members: :members:
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
mailinglists.urls module
------------------------
.. automodule:: mailinglists.urls
:members:
:undoc-members:
:show-inheritance:
mailinglists.views module
-------------------------
.. automodule:: mailinglists.views
:members:
:undoc-members:
:show-inheritance:
...@@ -2,12 +2,14 @@ ...@@ -2,12 +2,14 @@
set -e set -e
sphinx-build -b html /usr/src/app/docs/ /concrexit/docs/
until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l'; do until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l'; do
>&2 echo "PostgreSQL is unavailable: Sleeping" >&2 echo "PostgreSQL is unavailable: Sleeping"
sleep 5 sleep 5
done done
>&2 echo "PostgreSQL is up" >&2 echo "PostgreSQL is up"
cd /usr/src/app cd /usr/src/app/website/
>&2 echo "Running ./manage.py $@" >&2 echo "Running ./manage.py $@"
./manage.py $@ ./manage.py $@
...@@ -2,17 +2,20 @@ ...@@ -2,17 +2,20 @@
set -e set -e
>&2 echo "Creating Sphinx documentation"
sphinx-build -b html /usr/src/app/docs/ /concrexit/docs/
until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l'; do until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l'; do
>&2 echo "PostgreSQL is unavailable: Sleeping" >&2 echo "PostgreSQL is unavailable: Sleeping"
sleep 5 sleep 5
done done
>&2 echo "PostgreSQL is up" >&2 echo "PostgreSQL is up"
chown -R 33:33 /concrexit/ chown -R www-data:www-data /concrexit/
cd /usr/src/app cd /usr/src/app/website/
>&2 echo "Running site with uwsgi" >&2 echo "Running site with uwsgi"
uwsgi --chdir /usr/src/app \ uwsgi --chdir /usr/src/app/website \
--socket :8000 \ --socket :8000 \
--socket-timeout 1800 \ --socket-timeout 1800 \
--uid 33 \ --uid 33 \
......
Markdown is supported
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