mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
docker: Add postgres docker build with full text search.
This is multi-stage build which first builds tsearch-extras with the current version of postgres and then configs postgres for zulip. The zulip config installs the hunspell dictionaries, stop words file, tsearch-extras, and creates the initial database. **Testing Plan:** 1) `docker-compose up` the existing config. 2) Build the new image 3) Edit docker-compose.yml to use the new image id 4) `docker-compose up` and verify full text search is still working.
This commit is contained in:
committed by
Tim Abbott
parent
495104bd56
commit
24fbd7205d
@@ -39,16 +39,10 @@ source "$(dirname "$0")/terminate-psql-sessions" postgres zulip zulip_base
|
||||
cd /
|
||||
|
||||
su "$POSTGRES_USER" -c psql <<EOF
|
||||
CREATE USER zulip;
|
||||
ALTER ROLE zulip SET search_path TO zulip,public;
|
||||
DROP DATABASE IF EXISTS zulip;
|
||||
CREATE DATABASE zulip OWNER=zulip;
|
||||
EOF
|
||||
|
||||
su "$POSTGRES_USER" -c 'psql zulip' <<EOF
|
||||
CREATE SCHEMA zulip AUTHORIZATION zulip;
|
||||
CREATE EXTENSION tsearch_extras SCHEMA zulip;
|
||||
EOF
|
||||
"$(dirname "$0")/postgres-create-db"
|
||||
)
|
||||
|
||||
# Clear memcached to avoid contamination from previous database state
|
||||
|
||||
Reference in New Issue
Block a user