mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 00:53:56 +00:00
docs: Make it harder to screw up our manage.py commands.
This commit is contained in:
@@ -84,10 +84,11 @@ These settings include:
|
|||||||
- `EMAIL_*`, `DEFAULT_FROM_EMAIL`, and `NOREPLY_EMAIL_ADDRESS`:
|
- `EMAIL_*`, `DEFAULT_FROM_EMAIL`, and `NOREPLY_EMAIL_ADDRESS`:
|
||||||
Regardless of which authentication backends you enable, you must
|
Regardless of which authentication backends you enable, you must
|
||||||
provide settings for an outgoing SMTP server so Zulip can send
|
provide settings for an outgoing SMTP server so Zulip can send
|
||||||
emails when needed (and don't forget to set `email_password` in
|
emails when needed (and don't forget to set `email_password` in the
|
||||||
the `zulip-secrets.conf` file). We highly recommend testing
|
`zulip-secrets.conf` file). We highly recommend testing your
|
||||||
your configuration using `manage.py send_test_email` to confirm
|
configuration using `su zulip` and then
|
||||||
your outgoing email configuration is working correctly.
|
`/home/zulip/deployments/current/manage.py send_test_email` to
|
||||||
|
confirm your outgoing email configuration is working correctly.
|
||||||
|
|
||||||
## Step 4: Initialize Zulip database
|
## Step 4: Initialize Zulip database
|
||||||
|
|
||||||
@@ -109,16 +110,20 @@ in your Zulip installation.
|
|||||||
## Step 5: Create a Zulip organization and login
|
## Step 5: Create a Zulip organization and login
|
||||||
|
|
||||||
* If you haven't already, verify that your server can send email using
|
* If you haven't already, verify that your server can send email using
|
||||||
`./manage.py send_test_email username@example.com`. You'll need
|
|
||||||
working outgoing email to complete the setup process.
|
```
|
||||||
|
su zulip
|
||||||
|
/home/zulip/deployments/current/manage.py send_test_email user@example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
You'll need working outgoing email to complete the setup process.
|
||||||
|
|
||||||
* Run the organization (realm) creation [management
|
* Run the organization (realm) creation [management
|
||||||
command](prod-maintain-secure-upgrade.html#management-commands) :
|
command](prod-maintain-secure-upgrade.html#management-commands) :
|
||||||
|
|
||||||
```
|
```
|
||||||
su zulip # If you weren't already the zulip user
|
su zulip # If you weren't already the zulip user
|
||||||
cd /home/zulip/deployments/current
|
/home/zulip/deployments/current/manage.py generate_realm_creation_link
|
||||||
./manage.py generate_realm_creation_link
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This will print out a secure 1-time use link that allows creation of a
|
This will print out a secure 1-time use link that allows creation of a
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import scripts.lib.setup_path_on_import
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if 'posix' in os.name and os.geteuid() == 0:
|
if 'posix' in os.name and os.geteuid() == 0:
|
||||||
from django.core.management.base import CommandError
|
from django.core.management.base import CommandError
|
||||||
raise CommandError("manage.py should not be run as root.")
|
raise CommandError("manage.py should not be run as root. Use `su zulip` to drop root.")
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
||||||
os.environ.setdefault("PYTHONSTARTUP", os.path.join(BASE_DIR, "scripts/lib/pythonrc.py"))
|
os.environ.setdefault("PYTHONSTARTUP", os.path.join(BASE_DIR, "scripts/lib/pythonrc.py"))
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,8 @@ SSO_APPEND_DOMAIN = None # type: str
|
|||||||
# https://support.google.com/mail/answer/14257.
|
# https://support.google.com/mail/answer/14257.
|
||||||
#
|
#
|
||||||
# You can quickly test your sending email configuration using:
|
# You can quickly test your sending email configuration using:
|
||||||
# ./manage.py send_test_email username@example.com
|
# su zulip
|
||||||
|
# /home/zulip/deployments/current/manage.py send_test_email username@example.com
|
||||||
#
|
#
|
||||||
# A common problem is hosting providers that block outgoing SMTP traffic.
|
# A common problem is hosting providers that block outgoing SMTP traffic.
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user