Skip to content

Setting up

Serghei Iakovlev edited this page Oct 30, 2017 · 12 revisions

OAuth

Phosphorum uses Github as authentication system, you need a Client ID, a Secret ID and a Redirect Uri to be set up in the configuration (app/config/config.php).

Starting the Discord WebHook task

A Discord task can be enabled in background:

$ php forum discord:send &

You can launch Discord task by using Supervisor and config as follows:

; ------------------------------------------------------- ;
; /etc/supervisor/conf.d/discord-queue.conf               ;
;                                                         ;
; This is an example.                                     ;
; Please update the config according to your environment  ;
; ------------------------------------------------------- ;
[group:forum]
programs = discord
priority = 35

[program:queue]
command = /usr/bin/php forum discord:send
directory = /var/www/forum
process_name = %(program_name)s
startsecs = 0
autostart = true
autorestart = true
user = www-data

stdout_logfile=/var/log/supervisor/%(group_name)s_%(program_name)s_access.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB

stderr_logfile=/var/log/supervisor/%(group_name)s_%(program_name)s_error.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB

Starting the Beanstalkd client

A PHP client to deliver e-mails must be enabled in background:

$ php forum notifications:queue &

You can launch Beanstalkd client by using Supervisor and config as follows:

; ------------------------------------------------------- ;
; /etc/supervisor/conf.d/notifications-queue.conf         ;
;                                                         ;
; This is an example.                                     ;
; Please update the config according to your environment  ;
; ------------------------------------------------------- ;
[group:forum]
programs = queue
priority = 35

[program:queue]
command = /usr/bin/php forum notifications:queue
directory = /var/www/forum
process_name = %(program_name)s
startsecs = 0
autostart = true
autorestart = true
user = www-data

stdout_logfile=/var/log/supervisor/%(group_name)s_%(program_name)s_access.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB

stderr_logfile=/var/log/supervisor/%(group_name)s_%(program_name)s_error.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB