It is preferably to run flower as a daemon using systemd. Supervisord is not compatible with Python3 that has become a new best practice. Moreover, systemd is a standard process manager for most of the modern Linux distributions.
I use systemd as a daemon for flower in Ubuntu 16.04. Though I believe the set up won't be much different for other distributions.
Create a systemd configuration file called, for example, flower.service
. In my case, it is located in /etc/systemd/system
folder. It should contain:
[Unit]
Description=Flower Celery Service
[Service]
User=your_user
Group=www-data
WorkingDirectory=/var/www/project-working-directory
ExecStart=/home/user/miniconda3/envs/virtualenv/bin/flower --port=5555 --loglevel=info -A yourproject
Restart=on-failure
Type=simple
[Install]
WantedBy=multi-user.target
Basically, you may set all of the available options like in a terminal. By the way, you should use flower under virtual environment. Make sure that your user have privileges over a working directory.
Reload systemd daemon
sudo systemctl daemon-reload
Start a flower daemon
sudo systemctl start flower
That's all! This nice tutorial helped me get through the configuration process.