Skip to content

Commit

Permalink
fix: remove redundant cache container
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Apr 11, 2024
1 parent 9eab711 commit 7ece57a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
21 changes: 5 additions & 16 deletions Dockerfile.static
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,8 @@ ENV DJANGO_DEBUG=False \
PYTHONUNBUFFERED=0 \
TZ=PST \
DJANGO_SETTINGS_MODULE=${ARCHES_PROJECT}.settings
#N useradd arches && mkdir -p /static_root && chown -R arches /static_root
WORKDIR ${WEB_ROOT}/${ARCHES_PROJECT}

#OM $ARCHES_DYNAMIC_IMAGE as arches_dynamic
#OM arches_static_cache as arches
#ARG WEB_ROOT=/web_root
#RG STATIC_ROOT=/static_root
#G ARCHES_PROJECT
#PY --from=arches_dynamic ${WEB_ROOT}/entrypoint.sh ${WEB_ROOT}/entrypoint.sh
#PY --from=arches_dynamic ${WEB_ROOT}/${ARCHES_PROJECT}/ /web_root/${ARCHES_PROJECT}/
# settings_docker.py
#Y --from=arches_dynamic ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/settings_local.py ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/settings_local.py

RUN ${WEB_ROOT}/entrypoint.sh init_yarn_components

# FIXME: To be replaced once per-project settings working
Expand All @@ -86,11 +75,11 @@ FROM nginxinc/nginx-unprivileged:1.21.5-alpine
ARG WEB_ROOT=/web_root
ARG STATIC_ROOT=/static_root
ARG ARCHES_PROJECT
COPY --from=arches ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/media/* /usr/share/nginx/html/
COPY --from=arches ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/media/build/js/* /usr/share/nginx/html/js/
COPY --from=arches ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/webpack/webpack-stats.json /usr/share/nginx/webpack-stats.json
COPY --from=arches ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/media/node_modules/js-cookie/src/js.cookie.js /usr/share/nginx/html/js/js-cookie.js
COPY --from=arches ${STATIC_ROOT} /usr/share/nginx/html/static
COPY --from=arches_dynamic ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/media/* /usr/share/nginx/html/
COPY --from=arches_dynamic ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/media/build/js/* /usr/share/nginx/html/js/
COPY --from=arches_dynamic ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/webpack/webpack-stats.json /usr/share/nginx/webpack-stats.json
COPY --from=arches_dynamic ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/media/node_modules/js-cookie/src/js.cookie.js /usr/share/nginx/html/js/js-cookie.js
COPY --from=arches_dynamic ${STATIC_ROOT} /usr/share/nginx/html/static
#RUN mv /usr/share/nginx/html/static/* /usr/share/nginx/html

# Must be numeric to verify not root
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ services:
- ${ARCHES_PROJECT_ROOT}.:/web_root/$ARCHES_PROJECT
- ${ARCHES_PROJECT_ROOT}./docker/entrypoint.sh:/web_root/entrypoint.sh
- ${ARCHES_PROJECT_ROOT}./docker/settings_docker.py:/web_root/$ARCHES_PROJECT/$ARCHES_PROJECT/settings_local.py
# ${ARCHES_PROJECT_ROOT}./../arches-orm/arches_orm:/web_root/ENV/lib/python3.10/site-packages/arches_orm
- ${ARCHES_PROJECT_ROOT}./../arches-orm/arches_orm:/web_root/ENV/lib/python3.10/site-packages/arches_orm
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
- INSTALL_DEFAULT_CONCEPTS=False
- GUNICORN_WORKER_TIMEOUT=300
- PGUSERNAME=postgres
- PGPASSWORD=postgres
- PGDBNAME=arches
Expand All @@ -135,7 +136,6 @@ services:
- db
- elasticsearch
- rabbitmq
- arches
- cantaloupe

arches_worker:
Expand All @@ -159,7 +159,7 @@ services:
- ${ARCHES_PROJECT_ROOT}.:/web_root/$ARCHES_PROJECT
- ${ARCHES_PROJECT_ROOT}./docker/entrypoint.sh:/web_root/entrypoint.sh
- ${ARCHES_PROJECT_ROOT}./docker/settings_docker.py:/web_root/$ARCHES_PROJECT/$ARCHES_PROJECT/settings_local.py
# ${ARCHES_PROJECT_ROOT}./../arches-orm/arches_orm:/web_root/ENV/lib/python3.10/site-packages/arches_orm
- ${ARCHES_PROJECT_ROOT}./../arches-orm/arches_orm:/web_root/ENV/lib/python3.10/site-packages/arches_orm
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
Expand Down

0 comments on commit 7ece57a

Please sign in to comment.