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/ ...@@ -65,6 +65,9 @@ COPY website /usr/src/app/website/
# Copy files for Sphinx documentation # Copy files for Sphinx documentation
COPY README.md /usr/src/app/ COPY README.md /usr/src/app/
COPY docs /usr/src/app/docs 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 # Cache docs between builds if not mounting to FS
VOLUME /concrexit/docs VOLUME /concrexit/docs
......
...@@ -2,17 +2,15 @@ ...@@ -2,17 +2,15 @@
set -e set -e
>&2 echo "Creating Sphinx documentation" tar --extract --xz --file=/usr/src/app/docs.tar.xz --directory=/concrexit/docs/
sphinx-build -b html /usr/src/app/docs/ /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" >&2 echo "PostgreSQL is unavailable: Sleeping"
sleep 5 sleep 5
done done
>&2 echo "PostgreSQL is up" >&2 echo "PostgreSQL is up"
chown -R www-data:www-data /concrexit/
cd /usr/src/app/website/ cd /usr/src/app/website/
>&2 echo "Running site with uwsgi" >&2 echo "Running site with uwsgi"
uwsgi --chdir /usr/src/app/website \ uwsgi --chdir /usr/src/app/website \
......
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