Skip to content

Manual Installation Guide (Supervisor)

Chris King edited this page Feb 8, 2017 · 5 revisions

FiercePhish

This is the manual method of installing Supervisord for use with FiercePhish. This is a great background worker service that will not let the background workers break or die. It is highly recommended to install and use this (although the automated installer does this for you).

Why install this?

FiercePhish uses background jobs to send emails (not crons). The background worker needs to always be functioning to get emails out on time. Supervisor makes sure that background worker never quits so your emails are always good to go when they should be sent. Its also very easy to configure.

Prerequisites

  • Install FiercePhish

Manual Installation Method

This manual installation instructions assume you are running Ubuntu 16.04. You will need to modify the instructions to your own distribution. Some packages may be different, some configuration settings may change, but the general idea should be the same.

  1. Install Supervisor:

    apt-get install supervisor
    
  2. Add FiercePhish worker configuration:

    Create "/etc/supervisor/conf.d/FiercePhish.conf" with the following contents (changing the directory locations if they are different for you):

    [program:fiercephish]
    command=/usr/bin/php /var/www/fiercephish/artisan queue:work --queue=operation,email,campaign_email,default --tries 1 --timeout=86100
    process_name = %(program_name)s-80%(process_num)02d
    stdout_logfile = /var/log/fiercephish-80%(process_num)02d.log
    stdout_logfile_maxbytes=100MB
    stdout_logfile_backups=10
    autostart=true
    autorestart=true
    numprocs=10
    directory=/var/www/fiercephish
    user=www-data
    redirect_stderr=true
  3. Restart Supervisor

    service supervisor restart
    
  4. Reset queue listeners

php artisan queue:restart
  1. Done! You should see it running if you do a ps aux | grep php