Skip to content

Commit

Permalink
fix: try restoring from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Nov 16, 2024
1 parent 5771cdc commit 4f383e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile.static
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ARG ARCHES_BASE=flaxandteal/arches_base
ARG ARCHES_DYNAMIC_IMAGE=flaxandteal_${ARCHES_PROJECT}:$VERSION
ARG WEB_ROOT=/web_root
ARG ARCHES_ENVIRONMENT=production
ARG ARCHES_PRESEEDED=

FROM $ARCHES_DYNAMIC_IMAGE as arches

Expand All @@ -19,6 +20,7 @@ ARG ARCHES_ENVIRONMENT

ENV DJANGO_DEBUG=False \
DJANGO_MODE=STATIC \
ARCHES_PRESEEDED=${ARCHES_PRESEEDED} \
STATIC_URL=${STATIC_URL} \
STATIC_ROOT=/static_root \
ARCHES_NAMESPACE_FOR_DATA_EXPORT=${ARCHES_NAMESPACE_FOR_DATA_EXPORT} \
Expand Down Expand Up @@ -62,9 +64,11 @@ RUN (cd $WEB_ROOT/arches/arches && NODE_OPTIONS=--max_old_space_size=8192 NODE_P
RUN (cd $WEB_ROOT/$ARCHES_PROJECT/$ARCHES_PROJECT && NODE_OPTIONS=--max_old_space_size=8192 NODE_PATH=./media/node_modules yarn install -D)
RUN apt-get update && apt-get -y install python3-libxml2 git
RUN /bin/bash -c ". ../ENV/bin/activate;\
if [[ -z \"$ARCHES_PRESEEDED\" ]]; then \
python manage.py createcachetable;\
python manage.py load_ontology -s ${ARCHES_PROJECT}/pkg/ontologies;\
python manage.py packages -o load_package -s ${ARCHES_PROJECT}/pkg/ -y --no-business_data;\
fi;\
python manage.py es index_database\
";
COPY ./${ARCHES_PROJECT}/settings.py ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/settings.py
Expand Down

0 comments on commit 4f383e2

Please sign in to comment.