2018-05-16 01:04:50 +02:00
|
|
|
# To build run `docker build -f Dockerfile-postgresql .` from the root of the
|
|
|
|
# zulip repo.
|
|
|
|
|
2019-08-28 11:58:53 +02:00
|
|
|
# Currently the postgres images do not support automatic upgrading of
|
2018-05-16 01:04:50 +02:00
|
|
|
# the on-disk data in volumes. So the base image can not currently be upgraded
|
|
|
|
# without users needing a manual pgdump and restore.
|
|
|
|
|
2019-08-28 11:58:53 +02:00
|
|
|
# Install hunspell, zulip stop words, and run zulip database
|
2018-05-16 01:04:50 +02:00
|
|
|
# init.
|
2018-05-23 04:07:16 +02:00
|
|
|
FROM postgres:10
|
2018-05-16 01:04:50 +02:00
|
|
|
COPY puppet/zulip/files/postgresql/zulip_english.stop /usr/share/postgresql/$PG_MAJOR/tsearch_data/zulip_english.stop
|
2019-07-16 02:04:33 +02:00
|
|
|
COPY scripts/setup/create-db.sql /docker-entrypoint-initdb.d/zulip-create-db.sql
|
|
|
|
COPY scripts/setup/create-pgroonga.sql /docker-entrypoint-initdb.d/zulip-create-pgroonga.sql
|
2018-05-23 04:07:16 +02:00
|
|
|
COPY scripts/setup/pgroonga-debian.asc /tmp
|
|
|
|
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 \
|
2018-05-16 01:04:50 +02:00
|
|
|
&& 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.affix "/usr/share/postgresql/$PG_MAJOR/tsearch_data/en_us.affix" \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|