diff --git a/000-symlink-workerlist.sh b/000-symlink-workerlist.sh index c81804f..ffed305 100755 --- a/000-symlink-workerlist.sh +++ b/000-symlink-workerlist.sh @@ -9,9 +9,4 @@ workerlist=pg_worker_list.conf citusconfdir=/etc/citus externalworkerlist="$citusconfdir/$workerlist" -# create worker list file if it doesn't exist -touch "$externalworkerlist" - -# ensure permissions, then symlink to datadir -chown postgres:postgres "$externalworkerlist" -gosu postgres ln -s "$externalworkerlist" "$PGDATA/$workerlist" +ln -s "$externalworkerlist" "$PGDATA/$workerlist" diff --git a/CHANGELOG.md b/CHANGELOG.md index 97b85cf..c476bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +### citus-docker v6.1.0 (February 10, 2017) ### + +* Bump Citus version to 6.1.0 + +* Based on latest PostgreSQL 9.6.2 image and official Citus 6.1.0 package + +* Fixes to address breakage from recent postgres image changes + ### citus-docker v6.0.1 (December 1, 2016) ### * Bump Citus version to 6.0.1 diff --git a/Dockerfile b/Dockerfile index b550126..e79b170 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM postgres:9.6.1 +FROM postgres:9.6.2 MAINTAINER Citus Data https://citusdata.com -ENV CITUS_VERSION 6.0.1.citus-1 +ENV CITUS_VERSION 6.1.0.citus-1 # install Citus RUN apt-get update \ @@ -9,7 +9,7 @@ RUN apt-get update \ ca-certificates \ curl \ && curl -s https://install.citusdata.com/community/deb.sh | bash \ - && apt-get install -y postgresql-$PG_MAJOR-citus=$CITUS_VERSION \ + && apt-get install -y postgresql-$PG_MAJOR-citus-6.1=$CITUS_VERSION \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* @@ -19,5 +19,11 @@ RUN echo "shared_preload_libraries='citus'" >> /usr/share/postgresql/postgresql. # add scripts to run after initdb COPY 000-symlink-workerlist.sh 001-create-citus-extension.sql /docker-entrypoint-initdb.d/ +# add our wrapper entrypoint script +COPY citus-entrypoint.sh / + # expose workerlist via volume VOLUME /etc/citus + +ENTRYPOINT ["/citus-entrypoint.sh"] +CMD ["postgres"] diff --git a/README.md b/README.md index a81c380..4c32480 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ You can stop your stack with `docker-cloud stack terminate citus-cloud`. The following license information (and associated [LICENSE][license] file) apply _only to the files within **this** repository_. Please consult Citus’s own repository for information regarding its licensing. -Copyright © 2016 Citus Data, Inc. +Copyright © 2016–2017 Citus Data, Inc. Licensed 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 diff --git a/citus-entrypoint.sh b/citus-entrypoint.sh new file mode 100755 index 0000000..449aa71 --- /dev/null +++ b/citus-entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# make bash behave +set -euo pipefail +IFS=$'\n\t' + +# constants +workerlist=pg_worker_list.conf +citusconfdir=/etc/citus +externalworkerlist="$citusconfdir/$workerlist" + +# create worker list file if it doesn't exist +touch "$externalworkerlist" + +# ensure permissions, then symlink to datadir +chown postgres:postgres "$externalworkerlist" + +# call PostgreSQL's ENTRYPOINT script +exec '/docker-entrypoint.sh' "$@" diff --git a/docker-compose.yml b/docker-compose.yml index 37b5584..bb119b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,12 @@ version: '2' services: master: container_name: 'citus_master' - image: 'citusdata/citus:6.0.1' + image: 'citusdata/citus:6.1.0' ports: ['5432:5432'] labels: ['com.citusdata.role=Master'] volumes: ['/var/run/postgresql'] worker: - image: 'citusdata/citus:6.0.1' + image: 'citusdata/citus:6.1.0' labels: ['com.citusdata.role=Worker'] config: container_name: 'citus_config'