2015-08-15 11:42:27 +00:00
|
|
|
Running Wooey
|
|
|
|
=============
|
|
|
|
|
|
|
|
Wooey depends on a distributed worker to handle tasks, you can disable
|
|
|
|
this by setting **WOOEY\_CELERY** to False in your settings, which will
|
|
|
|
allow you to run Wooey through the simple command:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
python manage.py runserver
|
|
|
|
|
|
|
|
However, this will cause the server to execute tasks, which will block
|
|
|
|
the site.
|
|
|
|
|
|
|
|
The recommended ways to run Wooey are:
|
|
|
|
|
2016-01-08 07:01:49 +00:00
|
|
|
Through two separate processes
|
|
|
|
------------------------------
|
|
|
|
|
|
|
|
You can run Wooey by calling two commands (you will need a
|
|
|
|
separate process for each):
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2018-03-25 17:09:55 +00:00
|
|
|
celery -A your_project_name worker -c 1 --beat -l info
|
2016-01-08 07:01:49 +00:00
|
|
|
python manage.py runserver
|
|
|
|
|
2018-03-28 02:45:10 +00:00
|
|
|
On Windows, the ``--beat`` option may not be supported and the `eventlet`
|
|
|
|
pool will need to be specified. This looks like:
|
|
|
|
|
|
|
|
::
|
2018-06-11 01:29:58 +00:00
|
|
|
|
2018-03-28 02:45:10 +00:00
|
|
|
celery -A your_project_name worker --pool=eventlet -l info
|
2016-01-08 07:01:49 +00:00
|
|
|
|
2015-08-15 11:42:27 +00:00
|
|
|
Through a Procfile
|
|
|
|
------------------
|
|
|
|
|
2018-11-11 23:29:58 +00:00
|
|
|
A simple way to run Wooey on a server such as Heroku is through a Procfile
|
|
|
|
using `honcho <https://github.com/nickstenning/honcho>`__, which can be
|
2015-08-15 11:42:27 +00:00
|
|
|
installed via pip. Make a file, called Procfile in the root of your
|
|
|
|
project (the same place as manage.py) with the following contents:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
web: python manage.py runserver
|
2018-03-25 17:09:55 +00:00
|
|
|
worker: celery -A your_project_name worker -c 1 --beat -l info
|
2015-08-15 11:42:27 +00:00
|
|
|
EOM
|
|
|
|
|
|
|
|
Your server can then be run by the simple command:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
honcho start
|
2023-05-20 13:43:59 +00:00
|
|
|
|
2016-01-08 07:01:49 +00:00
|
|
|
On Windows, the ``--beat`` option may not be supported.
|
2018-11-11 23:29:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
With Docker
|
|
|
|
-----------
|
|
|
|
|
|
|
|
`Docker <https://www.docker.com>`__ is a great way to get Wooey up and running quickly, especially
|
|
|
|
for development. To get Wooey up and running with Docker and `docker-compose <https://docs.docker.com/compose/>`__,
|
|
|
|
follow these commands:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
git clone git@github.com:wooey/Wooey.git
|
|
|
|
cd Wooey/docker
|
|
|
|
./wooey-compose build wooey
|
|
|
|
./wooey-compose run wooey python manage.py createsuperuser
|
|
|
|
... fill in info ...
|
|
|
|
./wooey-compose up wooey celery
|
|
|
|
|
|
|
|
Now, a local Wooey server will be available at http://localhost:8081/ (or change the port in
|
2023-05-20 13:43:59 +00:00
|
|
|
docker-compose.override.yml).
|