Skip to content

Commit

Permalink
wip: corrections for arches 7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Dec 7, 2024
1 parent 327a1a5 commit f0b2687
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ RUN . ../ENV/bin/activate \
COPY . ${WEB_ROOT}/${ARCHES_PROJECT}/
RUN . ../ENV/bin/activate \
&& pip install cachetools websockets pika "protobuf>4.21,<5.0" \
&& (if [ -f ${WEB_ROOT}/${ARCHES_PROJECT}/requirements.txt ]; then pip install -r ${WEB_ROOT}/${ARCHES_PROJECT}/requirements.txt --no-binary :all:; fi)
&& (if [ -f ${WEB_ROOT}/${ARCHES_PROJECT}/requirements.txt ]; then pip install -r ${WEB_ROOT}/${ARCHES_PROJECT}/requirements.txt --no-binary :all:; fi) \
&& (if [ -f ${WEB_ROOT}/${ARCHES_PROJECT}/pyproject.toml ]; then (cd ${WEB_ROOT}/${ARCHES_PROJECT} && pip install -e .); fi)

RUN mkdir -p ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/uploadedfiles && chgrp -R arches ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/uploadedfiles && chmod -R g+rw ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/uploadedfiles

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.static
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ RUN (echo "\nARCHES_NAMESPACE_FOR_DATA_EXPORT='${ARCHES_NAMESPACE_FOR_DATA_EXPOR
RUN (echo "\nPUBLIC_SERVER_ADDRESS='${PUBLIC_SERVER_ADDRESS}' or ARCHES_NAMESPACE_FOR_DATA_EXPORT" >> ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/settings_local.py) && echo $STATIC_ROOT

RUN (cd $WEB_ROOT/arches/arches && NODE_OPTIONS=--max_old_space_size=8192 NODE_PATH=$WEB_ROOT/$ARCHES_PROJECT/$ARCHES_PROJECT/media/node_modules npm install)
RUN (cd $WEB_ROOT/$ARCHES_PROJECT/$ARCHES_PROJECT && NODE_OPTIONS=--max_old_space_size=8192 NODE_PATH=./media/node_modules npm install -D)
RUN (cd $WEB_ROOT/$ARCHES_PROJECT/$ARCHES_PROJECT && NODE_OPTIONS=--max_old_space_size=8192 NODE_PATH=./media/node_modules npm install -D && ls ./media/node_modules)
RUN apt-get update && apt-get -y install python3-libxml2 git
RUN /bin/bash -c ". ../ENV/bin/activate;\
python manage.py createcachetable;\
Expand Down
11 changes: 7 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ 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.12/site-packages/arches_orm
- ${ARCHES_PROJECT_ROOT}./../arches_doorstep/arches_doorstep:/web_root/ENV/lib/python3.12/site-packages/arches_doorstep
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
Expand Down Expand Up @@ -110,8 +111,9 @@ 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}./../.env/lib/python3.11/site-packages/graphql:/web_root/ENV/lib/python3.10/site-packages/graphql
- ${ARCHES_PROJECT_ROOT}./../arches-orm/arches_orm:/web_root/ENV/lib/python3.12/site-packages/arches_orm
- ${ARCHES_PROJECT_ROOT}./../arches_doorstep/arches_doorstep:/web_root/ENV/lib/python3.12/site-packages/arches_doorstep
#- ${ARCHES_PROJECT_ROOT}./../.env/lib/python3.11/site-packages/graphql:/web_root/ENV/lib/python3.12/site-packages/graphql
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- GUNICORN_WORKERS=1
Expand Down Expand Up @@ -164,7 +166,8 @@ 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.12/site-packages/arches_orm
- ${ARCHES_PROJECT_ROOT}./../arches_doorstep/arches_doorstep:/web_root/ENV/lib/python3.12/site-packages/arches_doorstep
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
Expand Down
7 changes: 1 addition & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ fi
# Read modules folder from npm config file
# Get string after '--install.modules-folder' -> get first word of the result
# -> remove line endlings -> trim quotes -> trim leading ./
NPM_MODULES_FOLDER=${PACKAGE_JSON_FOLDER}/$(awk \
-F '--install.modules-folder' '{print $2}' ${PACKAGE_JSON_FOLDER} \
| awk '{print $1}' \
| tr -d $'\r' \
| tr -d '"' \
| sed -e "s/^\.\///g")
NPM_MODULES_FOLDER=${PACKAGE_JSON_FOLDER}/media/node_modules

export DJANGO_PORT=${DJANGO_PORT:-8000}
STATIC_ROOT=${STATIC_ROOT:-/static_root}
Expand Down

0 comments on commit f0b2687

Please sign in to comment.