Skip to content

Running Management Commands

Nick Sweeting edited this page Jun 29, 2017 · 4 revisions

To run management commands on your docker-zulip container. You have to docker exec into the container, su zulip to switch to the zulip user, then run commands using the zulip-venv/bin/python inside of /home/zulip/deployments/current/.

A helper command to do this for you from the parent system is as follows:

#!/bin/bash
zulip_container_id=$(docker ps | grep galexrt/zulip | awk '{print $1}')

docker exec -it $zulip_container_id bash -c "sudo -u zulip /home/zulip/deployments/current/zulip-venv/bin/python /home/zulip/deployments/current/manage.py $@"

Save this as zulip_manage.sh, then you can use it to run commands like so:

./zulip_manage.sh help

Type 'manage.py help <subcommand>' for help on a specific subcommand.

Available subcommands:
...
./zulip_manage.sh generate_invite_links --realm yourdomain.com [email protected]
Clone this wiki locally