mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 09:03:57 +00:00
committed by
Tim Abbott
parent
9c29592178
commit
8bf80f699f
@@ -5,7 +5,7 @@
|
|||||||
# version. Currently the postgres images do not support automatic upgrading of
|
# version. Currently the postgres images do not support automatic upgrading of
|
||||||
# the on-disk data in volumes. So the base image can not currently be upgraded
|
# the on-disk data in volumes. So the base image can not currently be upgraded
|
||||||
# without users needing a manual pgdump and restore.
|
# without users needing a manual pgdump and restore.
|
||||||
FROM postgres:9.5
|
FROM postgres:10
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
postgresql-server-dev-$PG_MAJOR \
|
postgresql-server-dev-$PG_MAJOR \
|
||||||
@@ -22,14 +22,19 @@ RUN git clone https://github.com/zulip/tsearch_extras.git \
|
|||||||
|
|
||||||
# Install tsearch_extras, hunspell, zulip stop words, and run zulip database
|
# Install tsearch_extras, hunspell, zulip stop words, and run zulip database
|
||||||
# init.
|
# init.
|
||||||
FROM postgres:9.5
|
FROM postgres:10
|
||||||
ENV TSEARCH_EXTRAS_VERSION=0.4
|
ENV TSEARCH_EXTRAS_VERSION=0.4
|
||||||
ENV TSEARCH_EXTRAS_DEB=postgresql-${PG_MAJOR}-tsearch-extras_${TSEARCH_EXTRAS_VERSION}_amd64.deb
|
ENV TSEARCH_EXTRAS_DEB=postgresql-${PG_MAJOR}-tsearch-extras_${TSEARCH_EXTRAS_VERSION}_amd64.deb
|
||||||
COPY --from=0 /${TSEARCH_EXTRAS_DEB} /tmp
|
COPY --from=0 /${TSEARCH_EXTRAS_DEB} /tmp
|
||||||
COPY puppet/zulip/files/postgresql/zulip_english.stop /usr/share/postgresql/$PG_MAJOR/tsearch_data/zulip_english.stop
|
COPY puppet/zulip/files/postgresql/zulip_english.stop /usr/share/postgresql/$PG_MAJOR/tsearch_data/zulip_english.stop
|
||||||
COPY scripts/setup/postgres-create-db /docker-entrypoint-initdb.d/postgres-create-db.sh
|
COPY scripts/setup/postgres-create-db /docker-entrypoint-initdb.d/postgres-create-db.sh
|
||||||
RUN apt-get update \
|
COPY scripts/setup/pgroonga-debian.asc /tmp
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y hunspell-en-us \
|
RUN apt-key add /tmp/pgroonga-debian.asc \
|
||||||
|
&& echo "deb http://packages.groonga.org/debian/ stretch main" > /etc/apt/sources.list.d/zulip.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
|
||||||
|
hunspell-en-us \
|
||||||
|
postgresql-${PG_MAJOR}-pgroonga \
|
||||||
&& DEBIAN_FRONTEND=noninteractive dpkg -i /tmp/${TSEARCH_EXTRAS_DEB} \
|
&& DEBIAN_FRONTEND=noninteractive dpkg -i /tmp/${TSEARCH_EXTRAS_DEB} \
|
||||||
&& rm /tmp/${TSEARCH_EXTRAS_DEB} \
|
&& rm /tmp/${TSEARCH_EXTRAS_DEB} \
|
||||||
&& ln -sf /var/cache/postgresql/dicts/en_us.dict "/usr/share/postgresql/$PG_MAJOR/tsearch_data/en_us.dict" \
|
&& ln -sf /var/cache/postgresql/dicts/en_us.dict "/usr/share/postgresql/$PG_MAJOR/tsearch_data/en_us.dict" \
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ CREATE DATABASE zulip OWNER=zulip;
|
|||||||
\\connect zulip
|
\\connect zulip
|
||||||
CREATE SCHEMA zulip AUTHORIZATION zulip;
|
CREATE SCHEMA zulip AUTHORIZATION zulip;
|
||||||
CREATE EXTENSION tsearch_extras SCHEMA zulip;
|
CREATE EXTENSION tsearch_extras SCHEMA zulip;
|
||||||
|
CREATE EXTENSION pgroonga;
|
||||||
|
GRANT USAGE ON SCHEMA pgroonga TO zulip;
|
||||||
"
|
"
|
||||||
|
|
||||||
if [ -f /.dockerenv ]; then
|
if [ -f /.dockerenv ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user