Skip to content

Commit

Permalink
fix: move webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Jun 8, 2024
1 parent 9eb116a commit 2d3a531
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN . ../ENV/bin/activate \
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

COPY docker/settings_docker.py ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/settings_local.py
RUN echo "{}" > ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/webpack/webpack-stats.json
RUN echo "{}" > ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}/webpack-stats.json

WORKDIR ${WEB_ROOT}/${ARCHES_PROJECT}/${ARCHES_PROJECT}
RUN mkdir -p /static_root && chown -R arches /static_root
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.static
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ 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}/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
#RUN mv /usr/share/nginx/html/static/* /usr/share/nginx/html
Expand Down
28 changes: 16 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ services:
volumes:
- arches-log:/arches/arches/logs
- arches-static:/static_root
# $ARCHES_ROOT:/web_root/arches
# $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
- $ARCHES_ROOT:/web_root/arches
- $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
# ./$ARCHES_PROJECT/media/node_modules/arches/docker/gunicorn_config.py:/web_root/arches/arches/gunicorn_config.py
- ${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
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
Expand Down Expand Up @@ -103,15 +104,17 @@ services:
volumes:
- arches-log:/arches/arches/logs
- arches-static:/static_root
# $ARCHES_ROOT:/web_root/arches
# $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
- $ARCHES_ROOT:/web_root/arches
- $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
# ./$ARCHES_PROJECT/media/node_modules/arches/docker/gunicorn_config.py:/web_root/arches/arches/gunicorn_config.py
- ${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
#- ${ARCHES_PROJECT_ROOT}./../.env/lib/python3.11/site-packages/graphql:/web_root/ENV/lib/python3.10/site-packages/graphql
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- GUNICORN_WORKERS=1
- INSTALL_DEFAULT_GRAPHS=False
- INSTALL_DEFAULT_CONCEPTS=False
- GUNICORN_WORKER_TIMEOUT=300
Expand All @@ -124,6 +127,7 @@ services:
- ESPORT=9200
- DJANGO_MODE=DEV
- DJANGO_DEBUG=True
- DEBUG=True
# - DJANGO_REMOTE_DEBUG=False
- DOMAIN_NAMES=localhost
- PYTHONUNBUFFERED=0
Expand Down Expand Up @@ -154,13 +158,13 @@ services:
volumes:
- arches-log:/arches/arches/logs
- arches-static:/static_root
# $ARCHES_ROOT:/web_root/arches
# $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
- $ARCHES_ROOT:/web_root/arches
- $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
# ./$ARCHES_PROJECT/media/node_modules/arches/docker/gunicorn_config.py:/web_root/arches/arches/gunicorn_config.py
- ${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 Expand Up @@ -195,8 +199,8 @@ services:
# template directory created
image: kartoza/postgis:12.0
volumes:
- postgres-data:/var/lib/postgresql
- postgres-log:/var/log/postgresql
- postgres2-data:/var/lib/postgresql
- postgres2-log:/var/log/postgresql
- ${ARCHES_PROJECT_ROOT}./docker/init-unix.sql:/docker-entrypoint-initdb.d/init.sql # to set up the DB template
ports:
- '5432:5432'
Expand Down Expand Up @@ -235,7 +239,7 @@ services:
volumes:
arches-log:
arches-static:
postgres-log:
postgres-data:
postgres2-log:
postgres2-data:
elasticsearch-data:
cantaloupe-data:

0 comments on commit 2d3a531

Please sign in to comment.