mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
install: Use crudini for storing value of POSTGRES_MISSING_DICTIONARIES.
This simplifies the RDS installation process to avoid awkwardly requiring running the installer twice, and also is significantly more robust in handling issues around rerunning the installer. Finally, the answer for whether dictionaries are missing is available to Django for future use in warnings/etc. around full-text search not being great with this configuration, should they be required.
This commit is contained in:
@@ -134,14 +134,11 @@ follows:
|
||||
postgres_password = abcd1234
|
||||
```
|
||||
|
||||
Now complete the installation by running the following command to ask
|
||||
the Zulip installer to initialize the postgres database. (Note: The
|
||||
options are different from before).
|
||||
Now complete the installation by running the following commands.
|
||||
|
||||
```
|
||||
./zulip-server-*/scripts/setup/install --certbot \
|
||||
--email=YOUR_EMAIL --hostname=YOUR_HOSTNAME \
|
||||
--remote-postgres --postgres-missing-dictionaries
|
||||
# Ask Zulip installer to initialize the postgres database.
|
||||
su zulip -c '/home/zulip/deployments/current/scripts/setup/initialize-database'
|
||||
|
||||
# And then generate a realm creation link:
|
||||
su zulip -c '/home/zulip/deployments/current/manage.py generate_realm_creation_link'
|
||||
|
||||
@@ -280,7 +280,7 @@ if [ "$DEPLOYMENT_TYPE" = "dockervoyager" ]; then
|
||||
fi
|
||||
|
||||
if [ -n "$POSTGRES_MISSING_DICTIONARIES" ]; then
|
||||
export POSTGRES_MISSING_DICTIONARIES="true"
|
||||
crudini --set /etc/zulip/zulip.conf postgresql missing_dictionaries true
|
||||
fi
|
||||
|
||||
if [ -n "$REMOTE_POSTGRES" ]; then
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-06-22 10:22
|
||||
import os
|
||||
|
||||
import bitfield.models
|
||||
import django.contrib.auth.models
|
||||
@@ -37,12 +36,11 @@ class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
zulip_postgres_dictionaries_unavailable = os.getenv("POSTGRES_MISSING_DICTIONARIES", False)
|
||||
dependencies = [
|
||||
('auth', '0001_initial'),
|
||||
]
|
||||
|
||||
if zulip_postgres_dictionaries_unavailable:
|
||||
if settings.POSTGRES_MISSING_DICTIONARIES:
|
||||
fts_sql = """
|
||||
CREATE TEXT SEARCH CONFIGURATION zulip.english_us_search (COPY=pg_catalog.english);
|
||||
"""
|
||||
|
||||
@@ -293,6 +293,8 @@ elif REMOTE_POSTGRES_HOST != '':
|
||||
else:
|
||||
DATABASES['default']['OPTIONS']['sslmode'] = 'verify-full'
|
||||
|
||||
POSTGRES_MISSING_DICTIONARIES = bool(get_config('postgresql', 'missing_dictionaries', None))
|
||||
|
||||
########################################################################
|
||||
# RABBITMQ CONFIGURATION
|
||||
########################################################################
|
||||
|
||||
Reference in New Issue
Block a user