Verified Commit a9fe8340 authored by Joren Vrancken's avatar Joren Vrancken
Browse files

Run Sphinx build during docker image build

parent f8d4f57b
......@@ -65,6 +65,9 @@ COPY website /usr/src/app/website/
# Copy files for Sphinx documentation
COPY README.md /usr/src/app/
COPY docs /usr/src/app/docs
RUN sphinx-build -c /usr/src/app/docs/ /usr/src/app/docs/ /usr/src/app/docs/_build && \
tar --create --xz --file=/usr/src/app/docs.tar.xz --directory=/usr/src/app/docs/_build/ . && \
rm --recursive /usr/src/app/docs/
# Cache docs between builds if not mounting to FS
VOLUME /concrexit/docs
......
......@@ -2,17 +2,15 @@
set -e
>&2 echo "Creating Sphinx documentation"
sphinx-build -b html /usr/src/app/docs/ /concrexit/docs/
tar --extract --xz --file=/usr/src/app/docs.tar.xz --directory=/concrexit/docs/
chown -R www-data:www-data /concrexit/
until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l' $POSTGRES_DB; do
until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l' "$POSTGRES_DB"; do
>&2 echo "PostgreSQL is unavailable: Sleeping"
sleep 5
done
>&2 echo "PostgreSQL is up"
chown -R www-data:www-data /concrexit/
cd /usr/src/app/website/
>&2 echo "Running site with uwsgi"
uwsgi --chdir /usr/src/app/website \
......
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