Merge branch 'master' into ckan-chart-update
This commit is contained in:
commit
9c430247b8
|
@ -4,9 +4,10 @@ on:
|
|||
push:
|
||||
branches: master
|
||||
|
||||
|
||||
jobs:
|
||||
build-ckan-2-9:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
|
|
@ -4,9 +4,10 @@ on:
|
|||
pull_request:
|
||||
branches: master
|
||||
|
||||
|
||||
jobs:
|
||||
build-ckan-2-9:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
@ -52,6 +53,8 @@ jobs:
|
|||
tags: keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache-ubuntu-2-9
|
||||
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-ubuntu-2-9
|
||||
build-args: |
|
||||
--progress=plain
|
||||
|
||||
build-ckan-2-8:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -48,7 +48,7 @@ We recommend to use a multi-stage approach to extend the docker images that we p
|
|||
###################
|
||||
### Extensions ####
|
||||
###################
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.5 as extbuild
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.8 as extbuild
|
||||
|
||||
# Switch to the root user
|
||||
USER root
|
||||
|
@ -64,7 +64,7 @@ RUN pip wheel --wheel-dir=/wheels git+https://github.com/acmecorp/ckanext-acme@0
|
|||
############
|
||||
### MAIN ###
|
||||
############
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.5
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.8
|
||||
|
||||
# Add the custom extensions to the plugins list
|
||||
ENV CKAN__PLUGINS envvars image_view text_view recline_view datastore datapusher acme
|
||||
|
@ -94,9 +94,9 @@ You can add scripts to CKAN custom images and copy them to the *docker-afterinit
|
|||
## Build
|
||||
To build a CKAN image run:
|
||||
```sh
|
||||
docker build --tag ghcr.io/keitaroinc/ckan:2.9.5 images/ckan/2.9
|
||||
docker build --tag ghcr.io/keitaroinc/ckan:2.9.8 images/ckan/2.9
|
||||
```
|
||||
The –-tag ghcr.io/keitaroinc/ckan:2.9.5 flag sets the image name to ghcr.io/keitaroinc/ckan:2.9.5 and 'images/ckan/2.9' at the end tells docker build to use the context into the specified directory where the Dockerfile and related contents are.
|
||||
The –-tag ghcr.io/keitaroinc/ckan:2.9.8 flag sets the image name to ghcr.io/keitaroinc/ckan:2.9.8 and 'images/ckan/2.9' at the end tells docker build to use the context into the specified directory where the Dockerfile and related contents are.
|
||||
|
||||
## Upload to DockerHub
|
||||
>*It's recommended to upload built images to DockerHub*
|
||||
|
|
|
@ -10,6 +10,10 @@ CKAN_SITE_ID=default
|
|||
CKAN_SITE_URL=http://localhost:5000
|
||||
CKAN_PORT=5000
|
||||
CKAN_MAX_UPLOAD_SIZE_MB=10
|
||||
CKAN___BEAKER__SESSION__SECRET=CHANGE_ME
|
||||
# See https://docs.ckan.org/en/latest/maintaining/configuration.html#api-token-settings
|
||||
CKAN___API_TOKEN__JWT__ENCODE__SECRET=string:CHANGE_ME
|
||||
CKAN___API_TOKEN__JWT__DECODE__SECRET=string:CHANGE_ME
|
||||
# CKAN Plugins
|
||||
CKAN__PLUGINS=envvars image_view text_view recline_view datastore datapusher
|
||||
# CKAN requires storage path to be set in order for filestore to be enabled
|
||||
|
|
|
@ -12,7 +12,7 @@ POSTGRES_PORT=5432
|
|||
DATASTORE_READONLY_PASSWORD=datastore
|
||||
|
||||
# CKAN
|
||||
CKAN_VERSION=2.8.10
|
||||
CKAN_VERSION=2.8.12
|
||||
CKAN_SITE_ID=default
|
||||
CKAN_SITE_URL=http://localhost:5000
|
||||
CKAN_PORT=5000
|
||||
|
|
|
@ -15,6 +15,7 @@ services:
|
|||
- backend
|
||||
depends_on:
|
||||
- db
|
||||
- solr
|
||||
ports:
|
||||
- "0.0.0.0:${CKAN_PORT}:5000"
|
||||
env_file:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM postgis/postgis:14-3.2-alpine
|
||||
FROM postgis/postgis:11-3.3-alpine
|
||||
|
||||
# Allow connections; we don't map out any ports so only linked docker containers can connect
|
||||
RUN echo "host all all 0.0.0.0/0 md5" >> /var/lib/postgresql/data/pg_hba.conf
|
||||
|
|
|
@ -0,0 +1,203 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
NB Please copy changes to this file into the multilingual schema:
|
||||
ckanext/multilingual/solr/schema.xml
|
||||
-->
|
||||
|
||||
<!-- We update the version when there is a backward-incompatible change to this
|
||||
schema. We used to use the `version` attribute for this but this is an internal
|
||||
attribute that should not be used so starting from CKAN 2.10 we use the `name`
|
||||
attribute with the form `ckan-X.Y` -->
|
||||
<schema name="ckan-2.10" version="1.6">
|
||||
|
||||
<types>
|
||||
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
|
||||
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
|
||||
<fieldtype name="binary" class="solr.BinaryField"/>
|
||||
<fieldType name="int" class="solr.IntPointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="float" class="solr.FloatPointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="long" class="solr.LongPointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="double" class="solr.DoublePointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="pint" class="solr.IntPointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="pfloat" class="solr.FloatPointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="plong" class="solr.LongPointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="pdouble" class="solr.DoublePointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="date" class="solr.DatePointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
<fieldType name="pdate" class="solr.DatePointField" omitNorms="true" positionIncrementGap="0"/>
|
||||
|
||||
<fieldType name="pdates" class="solr.DatePointField" positionIncrementGap="0" multiValued="true"/>
|
||||
<fieldType name="booleans" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
|
||||
<fieldType name="pints" class="solr.IntPointField" positionIncrementGap="0" multiValued="true"/>
|
||||
<fieldType name="pfloats" class="solr.FloatPointField" positionIncrementGap="0" multiValued="true"/>
|
||||
<fieldType name="plongs" class="solr.LongPointField" positionIncrementGap="0" multiValued="true"/>
|
||||
<fieldType name="pdoubles" class="solr.DoublePointField" positionIncrementGap="0" multiValued="true"/>
|
||||
|
||||
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
|
||||
<analyzer type="index">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
|
||||
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
|
||||
<filter class="solr.ASCIIFoldingFilterFactory"/>
|
||||
</analyzer>
|
||||
<analyzer type="query">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
||||
<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
|
||||
<filter class="solr.ASCIIFoldingFilterFactory"/>
|
||||
</analyzer>
|
||||
</fieldType>
|
||||
|
||||
|
||||
<!-- A general unstemmed text field - good if one does not know the language of the field -->
|
||||
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
|
||||
<analyzer type="index">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
|
||||
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
</analyzer>
|
||||
<analyzer type="query">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
||||
<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
</analyzer>
|
||||
</fieldType>
|
||||
|
||||
<fieldType name="text_ngram" class="solr.TextField" positionIncrementGap="100">
|
||||
<analyzer type="index">
|
||||
<tokenizer class="solr.NGramTokenizerFactory" minGramSize="2" maxGramSize="10"/>
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
</analyzer>
|
||||
<analyzer type="query">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
</analyzer>
|
||||
</fieldType>
|
||||
|
||||
</types>
|
||||
|
||||
|
||||
<fields>
|
||||
<field name="index_id" type="string" indexed="true" stored="true" required="true" />
|
||||
<field name="id" type="string" indexed="true" stored="true" required="true" />
|
||||
<field name="site_id" type="string" indexed="true" stored="true" required="true" />
|
||||
<field name="title" type="text" indexed="true" stored="true" />
|
||||
<field name="title_ngram" type="text_ngram" indexed="true" stored="true" />
|
||||
<field name="entity_type" type="string" indexed="true" stored="true" omitNorms="true" />
|
||||
<field name="dataset_type" type="string" indexed="true" stored="true" />
|
||||
<field name="state" type="string" indexed="true" stored="true" omitNorms="true" />
|
||||
<field name="name" type="string" indexed="true" stored="true" omitNorms="true" />
|
||||
<field name="name_ngram" type="text_ngram" indexed="true" stored="true" />
|
||||
<field name="revision_id" type="string" indexed="true" stored="true" omitNorms="true" />
|
||||
<field name="version" type="string" indexed="true" stored="true" />
|
||||
<field name="url" type="string" indexed="true" stored="true" omitNorms="true" />
|
||||
<field name="ckan_url" type="string" indexed="true" stored="true" omitNorms="true" />
|
||||
<field name="download_url" type="string" indexed="true" stored="true" omitNorms="true" />
|
||||
<field name="notes" type="text" indexed="true" stored="true"/>
|
||||
<field name="author" type="text_general" indexed="true" stored="true" />
|
||||
<field name="author_email" type="text_general" indexed="true" stored="true" />
|
||||
<field name="maintainer" type="text_general" indexed="true" stored="true" />
|
||||
<field name="maintainer_email" type="text_general" indexed="true" stored="true" />
|
||||
<field name="license" type="string" indexed="true" stored="true" />
|
||||
<field name="license_id" type="string" indexed="true" stored="true" />
|
||||
<field name="tags" type="string" indexed="true" stored="true" multiValued="true"/>
|
||||
<field name="groups" type="string" indexed="true" stored="true" multiValued="true"/>
|
||||
<field name="organization" type="string" indexed="true" stored="true" multiValued="false"/>
|
||||
|
||||
<field name="capacity" type="string" indexed="true" stored="true" multiValued="false"/>
|
||||
<field name="permission_labels" type="string" indexed="true" stored="false" multiValued="true"/>
|
||||
|
||||
<field name="res_name" type="text_general" indexed="true" stored="true" multiValued="true" />
|
||||
<field name="res_description" type="text_general" indexed="true" stored="true" multiValued="true"/>
|
||||
<field name="res_format" type="string" indexed="true" stored="true" multiValued="true"/>
|
||||
<field name="res_url" type="string" indexed="true" stored="true" multiValued="true"/>
|
||||
<field name="res_type" type="string" indexed="true" stored="true" multiValued="true"/>
|
||||
|
||||
<!-- catchall field, containing all other searchable text fields (implemented
|
||||
via copyField further on in this schema -->
|
||||
<field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="urls" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
|
||||
<field name="depends_on" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="dependency_of" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="derives_from" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="has_derivation" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="links_to" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="linked_from" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="child_of" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="parent_of" type="text" indexed="true" stored="false" multiValued="true"/>
|
||||
<field name="views_total" type="int" indexed="true" stored="false"/>
|
||||
<field name="views_recent" type="int" indexed="true" stored="false"/>
|
||||
<field name="resources_accessed_total" type="int" indexed="true" stored="false"/>
|
||||
<field name="resources_accessed_recent" type="int" indexed="true" stored="false"/>
|
||||
|
||||
<field name="metadata_created" type="date" indexed="true" stored="true" multiValued="false"/>
|
||||
<field name="metadata_modified" type="date" indexed="true" stored="true" multiValued="false"/>
|
||||
|
||||
<field name="indexed_ts" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
|
||||
|
||||
<!-- Copy the title field into titleString, and treat as a string
|
||||
(rather than text type). This allows us to sort on the titleString -->
|
||||
<field name="title_string" type="string" indexed="true" stored="false" />
|
||||
|
||||
<field name="data_dict" type="string" indexed="false" stored="true" />
|
||||
<field name="validated_data_dict" type="string" indexed="false" stored="true" />
|
||||
|
||||
<field name="_version_" type="string" indexed="true" stored="true"/>
|
||||
|
||||
<dynamicField name="*_date" type="date" indexed="true" stored="true" multiValued="false"/>
|
||||
|
||||
<dynamicField name="extras_*" type="text" indexed="true" stored="true" multiValued="false"/>
|
||||
<dynamicField name="res_extras_*" type="text" indexed="true" stored="true" multiValued="true"/>
|
||||
<dynamicField name="vocab_*" type="string" indexed="true" stored="true" multiValued="true"/>
|
||||
<dynamicField name="*" type="string" indexed="true" stored="false"/>
|
||||
</fields>
|
||||
|
||||
<uniqueKey>index_id</uniqueKey>
|
||||
|
||||
<copyField source="url" dest="urls"/>
|
||||
<copyField source="title" dest="title_ngram"/>
|
||||
<copyField source="name" dest="name_ngram"/>
|
||||
<copyField source="ckan_url" dest="urls"/>
|
||||
<copyField source="download_url" dest="urls"/>
|
||||
<copyField source="res_url" dest="urls"/>
|
||||
<copyField source="extras_*" dest="text"/>
|
||||
<copyField source="res_extras_*" dest="text"/>
|
||||
<copyField source="vocab_*" dest="text"/>
|
||||
<copyField source="urls" dest="text"/>
|
||||
<copyField source="name" dest="text"/>
|
||||
<copyField source="title" dest="text"/>
|
||||
<copyField source="text" dest="text"/>
|
||||
<copyField source="license" dest="text"/>
|
||||
<copyField source="notes" dest="text"/>
|
||||
<copyField source="tags" dest="text"/>
|
||||
<copyField source="groups" dest="text"/>
|
||||
<copyField source="organization" dest="text"/>
|
||||
<copyField source="res_name" dest="text"/>
|
||||
<copyField source="res_description" dest="text"/>
|
||||
<copyField source="maintainer" dest="text"/>
|
||||
<copyField source="author" dest="text"/>
|
||||
|
||||
</schema>
|
|
@ -10,6 +10,10 @@ CKAN_SITE_ID=default
|
|||
CKAN_SITE_URL=http://localhost:5000
|
||||
CKAN_PORT=5000
|
||||
CKAN_MAX_UPLOAD_SIZE_MB=10
|
||||
CKAN___BEAKER__SESSION__SECRET=CHANGE_ME
|
||||
# See https://docs.ckan.org/en/latest/maintaining/configuration.html#api-token-settings
|
||||
CKAN___API_TOKEN__JWT__ENCODE__SECRET=string:CHANGE_ME
|
||||
CKAN___API_TOKEN__JWT__DECODE__SECRET=string:CHANGE_ME
|
||||
# CKAN Plugins
|
||||
CKAN__PLUGINS=envvars image_view text_view recline_view datastore datapusher
|
||||
# CKAN requires storage path to be set in order for filestore to be enabled
|
||||
|
@ -32,5 +36,5 @@ CKAN__DATAPUSHER__URL=http://datapusher:8000
|
|||
CKAN__DATAPUSHER__CALLBACK_URL_BASE=http://ckan:5000/
|
||||
|
||||
# Solr configuration
|
||||
CKAN_VERSION=2.9.5
|
||||
CKAN_VERSION=2.9.8
|
||||
CKAN_CORE_NAME=ckan
|
||||
|
|
|
@ -12,7 +12,7 @@ POSTGRES_PORT=5432
|
|||
DATASTORE_READONLY_PASSWORD=datastore
|
||||
|
||||
# CKAN
|
||||
CKAN_VERSION=2.9.5
|
||||
CKAN_VERSION=2.9.8
|
||||
CKAN_SITE_ID=default
|
||||
CKAN_SITE_URL=http://localhost:5000
|
||||
CKAN_PORT=5000
|
||||
|
|
|
@ -15,6 +15,7 @@ services:
|
|||
- backend
|
||||
depends_on:
|
||||
- db
|
||||
- solr
|
||||
ports:
|
||||
- "0.0.0.0:${CKAN_PORT}:5000"
|
||||
env_file:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Arguments are supplied via environment variables: CKAN_CORE_NAME CKAN_VERSION
|
||||
# Example:
|
||||
# CKAN_CORE_NAME=ckan
|
||||
# CKAN_VERSION=2.9.5
|
||||
# CKAN_VERSION=2.9.8
|
||||
|
||||
set -e
|
||||
|
||||
|
|
|
@ -33,5 +33,5 @@ CKAN__HARVEST__MQ__TYPE=redis
|
|||
CKAN__HARVEST__MQ__HOSTNAME=redis
|
||||
|
||||
# Solr configuration
|
||||
CKAN_VERSION=2.9.5
|
||||
CKAN_VERSION=2.9.8
|
||||
CKAN_CORE_NAME=ckan
|
||||
|
|
|
@ -12,7 +12,7 @@ POSTGRES_PORT=5432
|
|||
DATASTORE_READONLY_PASSWORD=datastore
|
||||
|
||||
# CKAN
|
||||
CKAN_VERSION=2.9.5
|
||||
CKAN_VERSION=2.9.8
|
||||
CKAN_SITE_ID=default
|
||||
CKAN_SITE_URL=http://localhost:5000
|
||||
CKAN_PORT=5000
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
###################
|
||||
### Extensions ####
|
||||
###################
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.5 as extbuild
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.8 as extbuild
|
||||
|
||||
# Locations and tags, please use specific tags or revisions
|
||||
ENV HARVEST_GIT_URL=https://github.com/ckan/ckanext-harvest
|
||||
|
@ -30,7 +30,7 @@ USER ckan
|
|||
############
|
||||
### MAIN ###
|
||||
############
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.5
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.8
|
||||
|
||||
LABEL maintainer="Keitaro Inc <info@keitaro.com>"
|
||||
|
||||
|
|
|
@ -38,5 +38,5 @@ CKANEXT__S3FILESTORE__REGION_NAME=us-east-1
|
|||
CKANEXT__S3FILESTORE__SIGNATURE_VERSION=s3v4
|
||||
|
||||
# Solr configuration
|
||||
CKAN_VERSION=2.9.5
|
||||
CKAN_VERSION=2.9.8
|
||||
CKAN_CORE_NAME=ckan
|
||||
|
|
|
@ -12,7 +12,7 @@ POSTGRES_PORT=5432
|
|||
DATASTORE_READONLY_PASSWORD=datastore
|
||||
|
||||
# CKAN
|
||||
CKAN_VERSION=2.9.5
|
||||
CKAN_VERSION=2.9.8
|
||||
CKAN_SITE_ID=default
|
||||
CKAN_SITE_URL=http://localhost:5000
|
||||
CKAN_PORT=5000
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
###################
|
||||
### Extensions ####
|
||||
###################
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.5 as extbuild
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.8 as extbuild
|
||||
|
||||
# Locations and tags, please use specific tags or revisions
|
||||
ENV S3FILESTORE_GIT_URL=https://github.com/keitaroinc/ckanext-s3filestore
|
||||
|
@ -20,7 +20,7 @@ USER ckan
|
|||
############
|
||||
### MAIN ###
|
||||
############
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.5
|
||||
FROM ghcr.io/keitaroinc/ckan:2.9.8
|
||||
|
||||
LABEL maintainer="Keitaro Inc <info@keitaro.com>"
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
|||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||
RUN rm -rf /srv/app/src/ckan/.git
|
||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.12.0 greenlet==1.1.3
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -139,7 +139,7 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
|||
COPY --from=ckanbuild /srv/app/src/ckan ${CKAN_DIR}
|
||||
|
||||
# Additional install steps for build stages artifacts
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.1.2
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.12.0
|
||||
|
||||
# Create a local user and group to run the app
|
||||
RUN addgroup -g 92 -S ckan && \
|
||||
|
@ -158,6 +158,7 @@ RUN pip install -e /srv/app/src/ckan && \
|
|||
echo "UTC" > /etc/timezone && \
|
||||
# Generate CKAN config
|
||||
paster --plugin=ckan make-config ckan ${APP_DIR}/production.ini && \
|
||||
paster --plugin=ckan config-tool ${APP_DIR}/production.ini "beaker.session.secret = " && \
|
||||
paster --plugin=ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
|
||||
# Set the default level for extensions to INFO
|
||||
paster --plugin=ckan config-tool ${APP_DIR}/production.ini -s logger_ckanext -e level=INFO && \
|
||||
|
|
|
@ -83,7 +83,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
|||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||
RUN rm -rf /srv/app/src/ckan/.git
|
||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.12.0 greenlet==1.1.3
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -189,8 +189,7 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
|||
COPY --from=ckanbuild /srv/app/src/ckan ${CKAN_DIR}
|
||||
|
||||
# Additional install steps for build stages artifacts
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.1.2
|
||||
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.12.0
|
||||
# Create a local user and group to run the app
|
||||
RUN groupadd -g 92 ckan && \
|
||||
useradd -rm -d /srv/app -s /bin/bash -g ckan -u 92 ckan
|
||||
|
|
|
@ -12,8 +12,16 @@ then
|
|||
done
|
||||
fi
|
||||
|
||||
if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini
|
||||
then
|
||||
echo "Setting beaker.session.secret in ini file"
|
||||
paster --plugin=ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')"
|
||||
fi
|
||||
|
||||
# Set the common uwsgi options
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch"
|
||||
echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers"
|
||||
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p ${UWSGI_PROC_NO:-2} -L --gevent-early-monkey-patch"
|
||||
|
||||
# Run the prerun script to init CKAN and create the default admin user
|
||||
python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; }
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
FROM alpine:3.14.2 as ckanbuild
|
||||
|
||||
# Used by Github Actions to tag the image with
|
||||
ENV IMAGE_TAG=2.8.10
|
||||
ENV IMAGE_TAG=2.8.12
|
||||
|
||||
# Set CKAN version to build
|
||||
ENV GIT_URL=https://github.com/ckan/ckan.git
|
||||
ENV GIT_BRANCH=ckan-2.8.10
|
||||
ENV GIT_BRANCH=ckan-2.8.12
|
||||
|
||||
# Set src dirs
|
||||
ENV SRC_DIR=/srv/app/src
|
||||
|
@ -54,7 +54,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
|||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||
RUN rm -rf /srv/app/src/ckan/.git
|
||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.12.0 greenlet==1.1.3
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -132,7 +132,7 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
|||
COPY --from=ckanbuild /srv/app/src/ckan ${CKAN_DIR}
|
||||
|
||||
# Additional install steps for build stages artifacts
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.1.2
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.12.0
|
||||
|
||||
# Create a local user and group to run the app
|
||||
RUN addgroup -g 92 -S ckan && \
|
||||
|
@ -151,6 +151,7 @@ RUN pip install -e /srv/app/src/ckan && \
|
|||
echo "UTC" > /etc/timezone && \
|
||||
# Generate CKAN config
|
||||
paster --plugin=ckan make-config ckan ${APP_DIR}/production.ini && \
|
||||
paster --plugin=ckan config-tool ${APP_DIR}/production.ini "beaker.session.secret = " && \
|
||||
paster --plugin=ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
|
||||
# Set the default level for extensions to INFO
|
||||
paster --plugin=ckan config-tool ${APP_DIR}/production.ini -s logger_ckanext -e level=INFO && \
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
FROM ubuntu:focal-20210827 as ckanbuild
|
||||
|
||||
# Used by Github Actions to tag the image with
|
||||
ENV IMAGE_TAG=2.8.10-focal
|
||||
ENV IMAGE_TAG=2.8.12-focal
|
||||
|
||||
# Set CKAN version to build
|
||||
ENV GIT_URL=https://github.com/ckan/ckan.git
|
||||
ENV GIT_BRANCH=ckan-2.8.10
|
||||
ENV GIT_BRANCH=ckan-2.8.12
|
||||
|
||||
# Set timezone
|
||||
ENV TZ=UTC
|
||||
|
@ -75,7 +75,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
|||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||
RUN rm -rf /srv/app/src/ckan/.git
|
||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.12.0 greenlet==1.1.3
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -174,7 +174,7 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
|||
COPY --from=ckanbuild /srv/app/src/ckan ${CKAN_DIR}
|
||||
|
||||
# Additional install steps for build stages artifacts
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.1.2
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.12.0
|
||||
|
||||
# Create a local user and group to run the app
|
||||
RUN groupadd -g 92 ckan && \
|
||||
|
|
|
@ -12,8 +12,16 @@ then
|
|||
done
|
||||
fi
|
||||
|
||||
if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini
|
||||
then
|
||||
echo "Setting beaker.session.secret in ini file"
|
||||
paster --plugin=ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')"
|
||||
fi
|
||||
|
||||
# Set the common uwsgi options
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch"
|
||||
echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers"
|
||||
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid 92 --gid 92 --http :5000 --master --enable-threads --paste config:/srv/app/production.ini --paste-logger /srv/app/production.ini --lazy-apps --gevent 2000 -p ${UWSGI_PROC_NO:-2} -L --gevent-early-monkey-patch"
|
||||
|
||||
# Run the prerun script to init CKAN and create the default admin user
|
||||
python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; }
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
FROM alpine:3.13.7 as ckanbuild
|
||||
|
||||
# Used by Github Actions to tag the image with
|
||||
ENV IMAGE_TAG=2.9.5
|
||||
ENV IMAGE_TAG=2.9.8
|
||||
|
||||
# Set CKAN version to build
|
||||
ENV GIT_URL=https://github.com/ckan/ckan.git
|
||||
ENV GIT_BRANCH=ckan-2.9.5
|
||||
ENV GIT_BRANCH=ckan-2.9.8
|
||||
|
||||
# Set src dirs
|
||||
ENV SRC_DIR=/srv/app/src
|
||||
|
@ -60,7 +60,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
|||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||
RUN rm -rf /srv/app/src/ckan/.git
|
||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0
|
||||
RUN pip wheel --wheel-dir=/wheels uWSGI==2.0.20 gevent==21.12.0 greenlet==1.1.3
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -143,7 +143,7 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
|||
COPY --from=ckanbuild /srv/app/src/ckan ${CKAN_DIR}
|
||||
|
||||
# Additional install steps for build stages artifacts
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.1.2
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uWSGI==2.0.20 gevent==21.12.0
|
||||
|
||||
# Create a local user and group to run the app
|
||||
RUN addgroup -g 92 -S ckan && \
|
||||
|
@ -162,6 +162,7 @@ RUN pip install -e /srv/app/src/ckan && \
|
|||
echo "UTC" > /etc/timezone && \
|
||||
# Generate CKAN config
|
||||
ckan generate config ${APP_DIR}/production.ini && \
|
||||
ckan config-tool ${APP_DIR}/production.ini "beaker.session.secret = " && \
|
||||
# Configure plugins
|
||||
ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
|
||||
# Create the data directory
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
FROM ubuntu:focal-20210827 as ckanbuild
|
||||
|
||||
# Used by Github Actions to tag the image with
|
||||
ENV IMAGE_TAG=2.9.5-focal
|
||||
ENV IMAGE_TAG=2.9.8-focal
|
||||
|
||||
# Set CKAN version to build
|
||||
ENV GIT_URL=https://github.com/ckan/ckan.git
|
||||
ENV GIT_BRANCH=ckan-2.9.5
|
||||
ENV GIT_BRANCH=ckan-2.9.8
|
||||
|
||||
# Set timezone
|
||||
ENV TZ=UTC
|
||||
|
@ -81,7 +81,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
|||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||
RUN rm -rf /srv/app/src/ckan/.git
|
||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0
|
||||
RUN pip wheel --wheel-dir=/wheels uWSGI==2.0.20 gevent==21.12.0 greenlet==1.1.3
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -192,7 +192,7 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
|||
COPY --from=ckanbuild /srv/app/src/ckan ${CKAN_DIR}
|
||||
|
||||
# Additional install steps for build stages artifacts
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.1.2
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uWSGI==2.0.20 gevent==21.12.0
|
||||
|
||||
# Create a local user and group to run the app
|
||||
RUN groupadd -g 92 ckan && \
|
||||
|
|
|
@ -12,8 +12,16 @@ then
|
|||
done
|
||||
fi
|
||||
|
||||
# Set the common uwsgi options
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid ckan --gid ckan --http :5000 --master --enable-threads --wsgi-file /srv/app/wsgi.py --module wsgi:application --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch --vacuum --harakiri 50 --callable application"
|
||||
if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini
|
||||
then
|
||||
echo "Setting secrets in ini file"
|
||||
ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python3 -c 'import secrets; print(secrets.token_urlsafe())')"
|
||||
ckan config-tool $APP_DIR/production.ini "api_token.jwt.encode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')"
|
||||
ckan config-tool $APP_DIR/production.ini "api_token.jwt.decode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')"
|
||||
fi
|
||||
|
||||
echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers"
|
||||
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid ckan --gid ckan --http :5000 --master --enable-threads --wsgi-file /srv/app/wsgi.py --module wsgi:application --lazy-apps --gevent 2000 -p ${UWSGI_PROC_NO:-2} -L --gevent-early-monkey-patch --vacuum --harakiri 50 --callable application"
|
||||
|
||||
# Run the prerun script to init CKAN and create the default admin user
|
||||
python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; }
|
||||
|
|
|
@ -50,7 +50,7 @@ RUN pip wheel --wheel-dir=/wheels -r ${REQUIREMENTS_URL}
|
|||
RUN curl -o /wheels/requirements.txt ${REQUIREMENTS_URL}
|
||||
|
||||
# Get uwsgi and gevent from pip
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==20.6.2 greenlet==0.4.16
|
||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.12.0 greenlet==1.1.3
|
||||
|
||||
|
||||
############
|
||||
|
@ -80,7 +80,7 @@ RUN curl -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py && \
|
|||
COPY --from=build /wheels /srv/app/wheels
|
||||
|
||||
# Install uwsgi and gevent
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==20.6.2
|
||||
RUN pip install --no-index --find-links=/srv/app/wheels uwsgi==2.0.19.1 gevent==21.12.0
|
||||
|
||||
# Create a local user and group to run the app
|
||||
RUN addgroup -g 92 -S ckan && \
|
||||
|
|
Loading…
Reference in New Issue