mirror of https://github.com/zulip/zulip.git
Update installation instructions to include configuring the app.
(imported from commit 89395815c32416ec0636efcff12eb76f5d890bbd)
This commit is contained in:
parent
e877536de5
commit
6bcd5a7ffc
|
@ -1,8 +1,15 @@
|
|||
#!/bin/sh -xe
|
||||
#!/bin/bash -xe
|
||||
|
||||
# Change to root directory of the checkout that we're running from
|
||||
cd $(dirname $0)/../..
|
||||
|
||||
echo "DROP SCHEMA zulip CASCADE; CREATE SCHEMA zulip;" | python manage.py dbshell
|
||||
|
||||
python manage.py checkconfig
|
||||
|
||||
python manage.py syncdb --noinput
|
||||
python manage.py migrate
|
||||
python manage.py createcachetable third_party_api_results
|
||||
python manage.py initialize_enterprise_db
|
||||
|
||||
supervisorctl restart all
|
|
@ -43,16 +43,19 @@ ln -nsf /etc/zulip/settings.py /root/zulip/zproject/local_settings.py
|
|||
deploy_path=$($(dirname $(dirname $0))/unpack-zulip "$tarball")
|
||||
ln -nsf "$deploy_path" /home/zulip/deployments/current
|
||||
chown -R zulip:zulip /home/zulip/deployments /var/log/zulip
|
||||
chown zulip:zulip /var/run/supervisor.sock
|
||||
|
||||
cd /home/zulip/deployments/current
|
||||
su zulip -c /home/zulip/deployments/current/scripts/setup/create-database
|
||||
|
||||
chown zulip:zulip /var/run/supervisor.sock
|
||||
supervisorctl restart all
|
||||
|
||||
set +x
|
||||
cat <<EOF
|
||||
|
||||
Done.
|
||||
Installation complete!
|
||||
|
||||
Now edit /etc/zulip/settings.py and fill in the mandatory values.
|
||||
|
||||
Once you've done that, please run:
|
||||
|
||||
su zulip -c /home/zulip/deployments/current/scripts/setup/initialize-database
|
||||
|
||||
EOF
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from optparse import make_option
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.conf import settings
|
||||
import sys
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = """Checks your Zulip Enterprise Django configuration for issues."""
|
||||
|
||||
option_list = BaseCommand.option_list + ()
|
||||
def handle(self, **options):
|
||||
for (setting_name, default) in settings.REQUIRED_SETTINGS:
|
||||
try:
|
||||
if settings.__getattr__(setting_name) != default:
|
||||
continue
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
print "Error: You must set %s in /etc/zulip/settings.py." % (setting_name,)
|
||||
sys.exit(1)
|
|
@ -270,6 +270,21 @@ for setting_name, setting_val in DEFAULT_SETTINGS.iteritems():
|
|||
if not setting_name in vars():
|
||||
vars()[setting_name] = setting_val
|
||||
|
||||
# These are the settings that manage.py checkconfig will check that
|
||||
# user has filled in before starting the app. It consists of a series
|
||||
# of pairs of (setting name, default value that it must be changed from)
|
||||
REQUIRED_SETTINGS = [("EXTERNAL_HOST", ""),
|
||||
("ZULIP_ADMINISTRATOR", ""),
|
||||
("ADMIN_DOMAIN", ""),
|
||||
("DEPLOYMENT_ROLE_NAME", ""),
|
||||
("DEPLOYMENT_ROLE_KEY", ""),
|
||||
# SECRET_KEY doesn't really need to be here, in
|
||||
# that we set it automatically, but just in
|
||||
# case, it seems worth having in this list
|
||||
("SECRET_KEY", ""),
|
||||
("AUTHENTICATION_BACKENDS", ()),
|
||||
]
|
||||
|
||||
REALM_BOTS = [ {'var_name': 'NOTIFICATION_BOT',
|
||||
'email_template': 'notification-bot@%s',
|
||||
'name': 'Notification Bot'},
|
||||
|
|
Loading…
Reference in New Issue