Skip to content

Commit

Permalink
Install extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
avdata99 committed Oct 22, 2024
1 parent 415df54 commit 31c1674
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@

{% block content_primary_nav %}
{{ h.build_nav_icon(group_type + '.read', _('Datasets'), id=group_dict.name, icon='sitemap') }}
<!-- El equipo UI solicita que se remuevan estos menúes #20
{{ h.build_nav_icon(group_type + '.activity', _('Activity Stream'), id=group_dict.name, offset=0, icon='clock-o') }}
{{ h.build_nav_icon(group_type + '.about', _('About'), id=group_dict.name, icon='info-circle') }}
-->
<!-- El equipo UI solicita que se remuevan estos menúes #20 -->
{% endblock %}
3 changes: 1 addition & 2 deletions ckanext-unckan/test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ use = config:../../ckan/test-core.ini

# Insert any custom config settings to be used when running your extension's
# tests here. These will override the one defined in CKAN core's test-core.ini
ckan.plugins = unckan

ckan.plugins = unckan pdf_view

# Logging configuration
[loggers]
Expand Down
2 changes: 2 additions & 0 deletions docker/ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ COPY files/cert/localhost.key ${APP_DIR}/files/cert/localhost.key
COPY files/patches ${APP_DIR}/files/patches
COPY files/ckan.ini ${CKAN_INI}
COPY files/scripts/install-ckan.sh ${APP_DIR}/files/scripts/install-ckan.sh
COPY files/scripts/install-extensions.sh ${APP_DIR}/files/scripts/install-extensions.sh
COPY files/scripts/setup-ckan-ini-file.sh ${APP_DIR}/files/scripts/setup-ckan-ini-file.sh

# Create the ckan user
Expand All @@ -51,6 +52,7 @@ USER ckan

# Install CKAN
RUN ${APP_DIR}/files/scripts/install-ckan.sh
RUN ${APP_DIR}/files/scripts/install-extensions.sh
RUN cp $APP_DIR/ckan/wsgi.py .
RUN chmod u+x wsgi.py
RUN ${APP_DIR}/files/scripts/setup-ckan-ini-file.sh
Expand Down
4 changes: 2 additions & 2 deletions docker/ckan/files/ckan.ini
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ ckan.cors.origin_allow_all = false
ckan.cors.origin_whitelist =

## Plugins Settings ############################################################
ckan.plugins = unckan
ckan.plugins = unckan pdf_view
ckan.resource_proxy.timeout = 5

## Front-End Settings ##########################################################
Expand All @@ -160,7 +160,7 @@ ckan.debug_supress_header = false
ckan.site_custom_css =

## Resource Views Settings #####################################################
ckan.views.default_views =
ckan.views.default_views = pdf_view

## Theming Settings ############################################################
ckan.template_title_delimiter = -
Expand Down
26 changes: 26 additions & 0 deletions docker/ckan/files/scripts/install-extensions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash -e

# load env vars from ${APP_DIR}/.env
set -o allexport
. ${APP_DIR}/.env
set +o allexport

echo "Installing Extensions"

python -m venv ${APP_DIR}/venv
source ${APP_DIR}/venv/bin/activate

# Si estamos en el entorno de desarrollo ya esta montada la carpeta de la extension unckan
# Para produccion hay que instalarlo desde el repositorio principal
if [ "$IS_DEV_ENV" != "true" ] ; then
# En este caso, el archivo pyproject.toml esta en una subcarpeta del repo, en
# https://github.com/unckan/ckan-env/tree/start_extension/ckanext-unckan
pip install git+https://github.com/unckan/ckan-env/tree/develop/ckanext-unckan.git#egg=ckanext-unckan
# Instalar sus requerimientos
pip install -r https://raw.githubusercontent.com/unckan/ckan-env/refs/heads/develop/ckanext-unckan/requirements.txt
fi

# PDF view https://github.com/ckan/ckanext-pdfview
pip install git+https://github.com/ckan/ckanext-pdfview.git#egg=ckanext-pdfview

echo "CKAN extensions installed"

0 comments on commit 31c1674

Please sign in to comment.