Skip to content

Commit

Permalink
enable multilingual plugins; pre-populate ckan db with labels
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasianayden committed Mar 12, 2024
1 parent dc4529d commit 94356c9
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN for d in $APP_DIR/patches/*; do \
fi ; \
done

ENV CKAN__PLUGINS="envvars image_view text_view recline_view scheming_datasets scheming_organizations dcat dcat_json_interface harvest ckan_harvester dcat_rdf_harvester dcat_json_harvester fairdatapointharvester oidc_pkce gdi_userportal activity"
ENV CKAN__PLUGINS="envvars image_view text_view recline_view scheming_datasets scheming_organizations dcat dcat_json_interface harvest ckan_harvester dcat_rdf_harvester dcat_json_harvester fairdatapointharvester oidc_pkce gdi_userportal activity multilingual_dataset multilingual_group multilingual_tag"

COPY --chown=ckan:ckan setup/prerun.py ${APP_DIR}

Expand Down
2 changes: 1 addition & 1 deletion ckan/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ RUN for d in $APP_DIR/patches/*; do \
fi ; \
done

ENV CKAN__PLUGINS="envvars image_view text_view recline_view scheming_datasets scheming_organizations gdi_userportal dcat harvest ckan_harvester dcat_rdf_harvester dcat_json_harvester dcat_json_interface oidc_pkce fairdatapointharvester activity"
ENV CKAN__PLUGINS="envvars image_view text_view recline_view scheming_datasets scheming_organizations gdi_userportal dcat harvest ckan_harvester dcat_rdf_harvester dcat_json_harvester dcat_json_interface oidc_pkce fairdatapointharvester activity multilingual_dataset multilingual_group multilingual_tag"
35 changes: 35 additions & 0 deletions ckan/prepopulate_db/common_vocabulary_tags.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
term,term_translation,lang_code
http://id.loc.gov/vocabulary/iso639-1/en,English,en
http://id.loc.gov/vocabulary/iso639-1/nl,Dutch,en
http://id.loc.gov/vocabulary/iso639-1/de,German,en
http://id.loc.gov/vocabulary/iso639-1/fr,French,en
http://id.loc.gov/vocabulary/iso639-1/lb,Luxembourgish,en
https://publications.europa.eu/resource/authority/language/ENG,English,en
https://publications.europa.eu/resource/authority/language/LTZ,Luxembourgish,en
https://publications.europa.eu/resource/authority/language/DEU,German,en
https://publications.europa.eu/resource/authority/language/FRA,French,en
http://publications.europa.eu/resource/authority/access-right/PUBLIC,Public,en
http://publications.europa.eu/resource/authority/access-right/RESTRICTED,Restricted,en
http://publications.europa.eu/resource/authority/access-right/NON_PUBLIC,Non-public,en
http://purl.org/adms/status/Completed,Completed,en
http://purl.org/adms/status/Deprecated,Deprecated,en
http://purl.org/adms/status/UnderDevelopment,UnderDevelopment,en
http://purl.org/adms/status/Withdrawn,Withdrawn,en
http://purl.org/cld/freq/triennial,triennial,en
http://purl.org/cld/freq/biennial,biennial,en
http://purl.org/cld/freq/annual,annual,en
http://purl.org/cld/freq/semiannual,semiannual,en
http://purl.org/cld/freq/threeTimesAYear,three times a year,en
http://purl.org/cld/freq/quarterly,quarterly,en
http://purl.org/cld/freq/bimonthly,bimonthly,en
http://purl.org/cld/freq/monthly,monthly,en
http://purl.org/cld/freq/semimonthly,semimonthly,en
http://purl.org/cld/freq/biweekly,biweekly,en
http://purl.org/cld/freq/threeTimesAMonth,three times a month,en
http://purl.org/cld/freq/weekly,weekly,en
http://purl.org/cld/freq/semiweekly,semiweekly,en
http://purl.org/cld/freq/threeTimesAWeek,three times a week,en
http://purl.org/cld/freq/daily,daily,en
http://purl.org/cld/freq/continuous,continuous,en
http://purl.org/cld/freq/irregular,irregular,en
https://bioportal.bioontology.org/ontologies/ICD10CM?p=classes&conceptid=U07.1,COVID-19,en
5 changes: 5 additions & 0 deletions ckan/prepopulate_db/upload_vocabulary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e

psql postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$CKAN_DB -c "\copy public.term_translation FROM '/prepopulate_db/common_vocabulary_tags.csv' WITH (DELIMITER ',', FORMAT CSV, HEADER TRUE);"
18 changes: 17 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
- ./src:/srv/app/src_extensions
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5500"]
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"]

postgres:
build:
Expand Down Expand Up @@ -90,3 +90,19 @@ services:
- KC_HOSTNAME
healthcheck:
test: ["CMD", "curl", "-o", "/dev/null", http://localhost:8080/health/ready"]

populate_db:
container_name: populate_db
command:
- "/bin/sh"
- "/prepopulate_db/upload_vocabulary.sh"
depends_on:
ckan-dev:
condition: service_healthy
postgres:
condition: service_healthy
env_file:
- .env
image: rtdl/psql-client:latest
volumes:
- ./ckan/prepopulate_db:/prepopulate_db

0 comments on commit 94356c9

Please sign in to comment.