Skip to content

Commit

Permalink
Adds an editable build of arches templating (#17)
Browse files Browse the repository at this point in the history
* Adds an editable build of arches templating

* Update dockerfile and compose
aarongundel authored Sep 25, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 77c7a69 commit 894dcdb
Showing 2 changed files with 20 additions and 7 deletions.
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -14,13 +14,17 @@ ARG TARGETARCH
# Select final stage based on TARGETARCH ARG
FROM stage-${TARGETARCH} as final

ARG ARCHES_FOR_SCIENCE_HOST_DIR
ARG ARCHES_CORE_HOST_DIR
ARG ARCHES_TEMPLATING_HOST_DIR

## Setting default environment variables
ENV WEB_ROOT=/web_root
ENV APP_ROOT=${WEB_ROOT}/disco
# Root project folder
ENV ARCHES_ROOT=${WEB_ROOT}/arches
ENV AFS_ROOT=${WEB_ROOT}/arches-for-science
ENV WHEELS=/wheels
ENV TEMPLATING_ROOT=${WEB_ROOT}/arches-templating
ENV PYTHONUNBUFFERED=1
ENV NODE_MAJOR=18

@@ -66,15 +70,18 @@ RUN rm -rf /root/.cache/pip/*

# Install the Arches application
# FIXME: ADD from github repository instead?
COPY ./arches ${ARCHES_ROOT}
COPY ./arches-for-science ${AFS_ROOT}

COPY ${ARCHES_CORE_HOST_DIR} ${ARCHES_ROOT}
COPY ${ARCHES_FOR_SCIENCE_HOST_DIR} ${AFS_ROOT}
COPY ${ARCHES_TEMPLATING_HOST_DIR} ${TEMPLATING_ROOT}

WORKDIR ${AFS_ROOT}
RUN pip install -e .

RUN pip uninstall arches -y

WORKDIR ${TEMPLATING_ROOT}
RUN pip install -e .

# afs app installed _before_ arches core - otherwise afs dependencies will overwrite arches editable install.
WORKDIR ${ARCHES_ROOT}
RUN pip install -e . --user && pip install -r arches/install/requirements.txt && pip install -r arches/install/requirements_dev.txt
12 changes: 9 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -5,14 +5,20 @@ services:
container_name: disco
image: fargeo/disco
build:
args:
# These are not delivered from the env_file - they're from --build-arg arguments.
ARCHES_TEMPLATING_HOST_DIR: ../arches-templating/
ARCHES_FOR_SCIENCE_HOST_DIR: ../arches-for-science/
ARCHES_CORE_HOST_DIR: ../arches/
context: ..
dockerfile: disco/Dockerfile
command: run_arches
volumes:
- ${ARCHES_CORE_DIR:-../arches/}:/web_root/arches
# To change these variables, modify/add the .env file prior to launch - NOT env_file.env
- ${ARCHES_CORE_HOST_DIR:-../arches/}:/web_root/arches
- ./:/web_root/disco
- ${ARCHES_TEMPLATING_DIR:-../arches_templating/}:/web_root/arches_templating
- ${ARCHES_FOR_SCIENCE_DIR:-../arches-for-science/}:/web_root/arches-for-science
- ${ARCHES_TEMPLATING_HOST_DIR:-../arches-templating/}:/web_root/arches-templating
- ${ARCHES_FOR_SCIENCE_HOST_DIR:-../arches-for-science/}:/web_root/arches-for-science
- $HOME/.aws/:/root/.aws/

- cantaloupe-data-disco:/web_root/disco/disco/uploadedfiles

0 comments on commit 894dcdb

Please sign in to comment.