Skip to content

Commit

Permalink
Added ENV for Storage and URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul Hidalgo Caballero committed Dec 20, 2016
1 parent 0466e5e commit d802264
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Expand Up @@ -6,6 +6,7 @@ MAINTAINER Open Knowledge
ENV CKAN_HOME /usr/lib/ckan/default
ENV CKAN_CONFIG /etc/ckan/default
ENV CKAN_DATA /var/lib/ckan
ENV SITE_URL http://localhost:5000

# Install required packages
RUN apt-get -q -y update && apt-get -q -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -q -y install \
Expand Down
12 changes: 2 additions & 10 deletions contrib/docker/ckan-entrypoint.sh
Expand Up @@ -8,8 +8,6 @@ set -eu
: ${SOLR_URL:=}
# URL for redis (required unless linked to a container called 'redis')
: ${REDIS_URL:=}
# Email to which errors should be sent (optional, default: none)
: ${ERROR_EMAIL:=}

CONFIG="${CKAN_CONFIG}/ckan.ini"

Expand All @@ -25,14 +23,8 @@ write_config () {
"sqlalchemy.url = ${DATABASE_URL}" \
"solr_url = ${SOLR_URL}" \
"ckan.redis.url = ${REDIS_URL}" \
"ckan.storage_path = /var/lib/ckan" \
"email_to = disabled@example.com" \
"error_email_from = ckan@$(hostname -f)" \
"ckan.site_url = http://localhost:5000"

if [ -n "$ERROR_EMAIL" ]; then
sed -i -e "s&^#email_to.*&email_to = ${ERROR_EMAIL}&" "$CONFIG"
fi
"ckan.storage_path = ${CKAN_DATA}" \
"ckan.site_url = ${SITE_URL}"
}

link_postgres_url () {
Expand Down

0 comments on commit d802264

Please sign in to comment.