r/django • • 5d ago

./tools/provision

Do i have to use ./tools/provision everytime I open my localhost or is it all right if I don't?

0 Upvotes

9 comments sorted by

4

u/SlumdogSkillionaire 5d ago

What is that?

1

u/user5034999999 3d ago

Its a command used in a Zulip environment.

1

u/Sufficient-Tale6131 5d ago

That script is from the Zulip dev environment (it's a Django project, which is probably why people here haven't seen it).

No, you don't run it every time. Provision installs and updates the dependencies: the Python venv, node modules, the dev databases and so on. Once it has finished, the normal routine is just:

  • vagrant up, then vagrant ssh (skip this if you set it up without Vagrant)
  • ./tools/run-dev
  • open http://localhost:9991

You need to re-run ./tools/provision after you pull or rebase onto newer upstream code that changed dependencies or migrations. You don't have to track that yourself: Zulip keeps a provision version number in the repo, and run-dev and the test tools check it and tell you to provision again when yours is out of date. So if run-dev starts fine, you're good.

If something odd breaks right after a git pull, re-provisioning is the first thing to try before digging further.

1

u/user5034999999 3d ago

Thanks a lot!! I understood

1

u/aayush_satna_dev 4d ago

If you are running `provision` scripts constantly then there is a chance that you local environment isn't persisting properly. It needs to be run only when the underlying things change.

1

u/user5034999999 3d ago

Ok,understood. Thanks.

1

u/tom-mart 5d ago

What's ./tools/provision? Don't think I ever came across it.

0

u/[deleted] 3d ago

[deleted] — view deleted comment

1

u/user5034999999 3d ago

It is a command used in a Zulip environment

1

u/tom-mart 3d ago

What's Zulip?