Skip to content

Commit

Permalink
Adjust kobocat-template in settings and…
Browse files Browse the repository at this point in the history
Dockerfiles to use directory inside this repository instead of a separate
repository in the parent directory
  • Loading branch information
jnm committed Mar 28, 2019
1 parent 4c5c40f commit 11e027e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
12 changes: 1 addition & 11 deletions Dockerfile.kobocat_base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Base image to take care of installing `apt` and `pip` requirements. Also clones the `kobocat-template` repo.
# Base image to take care of installing `apt` and `pip` requirements.

FROM kobotoolbox/base-kobos:latest

Expand Down Expand Up @@ -31,13 +31,3 @@ RUN mkdir -p ${PIP_EDITABLE_PACKAGES_DIR} && \
pip install --src ${PIP_EDITABLE_PACKAGES_DIR}/ -r ${KOBOCAT_TMP_DIR}/base_requirements/base.pip && \
pip install --src ${PIP_EDITABLE_PACKAGES_DIR}/ -r ${KOBOCAT_TMP_DIR}/base_requirements/s3.pip && \
rm -rf ~/.cache/pip


################################
# Install `kobocat-templates`. #
################################

RUN mkdir -p /srv/src && \
cd /srv/src && \
git clone --depth 1 https://github.com/kobotoolbox/kobocat-template.git -b master && \
chown -R ${UWSGI_USER} /srv/src/kobocat-template
3 changes: 2 additions & 1 deletion onadata/settings/kc_environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def celery_logger_setup_handler(logger, **kwargs):
# include the kobocat-template directory
TEMPLATE_OVERRIDE_ROOT_DIR = os.environ.get(
'KOBOCAT_TEMPLATES_PATH',
os.path.abspath(os.path.join(PROJECT_ROOT, '..', 'kobocat-template'))
os.path.abspath(os.path.join(PROJECT_ROOT, 'kobocat-template'))
)
TEMPLATE_DIRS = (os.path.join(TEMPLATE_OVERRIDE_ROOT_DIR, 'templates'), ) + TEMPLATE_DIRS
STATICFILES_DIRS += (os.path.join(TEMPLATE_OVERRIDE_ROOT_DIR, 'static'), )
Expand Down Expand Up @@ -294,3 +294,4 @@ def celery_logger_setup_handler(logger, **kwargs):
}
# #### END ISSUE 242 FIX ######


2 changes: 1 addition & 1 deletion onadata/settings/test_environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
# include the kobocat-template directory
TEMPLATE_OVERRIDE_ROOT_DIR = os.environ.get(
'KOBOCAT_TEMPLATES_PATH',
os.path.abspath(os.path.join(PROJECT_ROOT, '..', 'kobocat-template'))
os.path.abspath(os.path.join(PROJECT_ROOT, 'kobocat-template'))
)
TEMPLATE_DIRS = ( os.path.join(TEMPLATE_OVERRIDE_ROOT_DIR, 'templates'), ) + TEMPLATE_DIRS
STATICFILES_DIRS += ( os.path.join(TEMPLATE_OVERRIDE_ROOT_DIR, 'static'), )
Expand Down

0 comments on commit 11e027e

Please sign in to comment.