Browse Source

Update README to include Supervisor configs

master
Orzu Ionut 2 years ago
parent
commit
58b4b1e329
  1. 62
      README.md

62
README.md

@ -54,14 +54,70 @@ details about installing Facebook Duckling in a section below.
`php artisan migrate`
- Start Supervisor (after adding the Supervisor configs detailed below)
`supervisorctl start all`
- (Optional) Restart Supervisor after a config file update
`supervisorctl reread`
`supervisorctl update`
`supervisorctl restart <name>`
### Queues Supervisor config
Add a new Supervisor config file in the "/etc/supervisor/conf.d" path like in the example below:
Config file path: /etc/supervisor/conf.d/queue-worker-search-and-displace-core-production.conf
```bash
[program:queue-worker-search-and-displace-core-production]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/searchanddisplace-core/artisan queue:listen --queue=sd_core,default --tries=2 --timeout=180
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stdout_logfile=/var/log/queue/queue-worker-search-and-displace-core-production.log
```
The value for the 'command' key should reflect the app path (in the example above the app's path is "/var/www/html/searchanddisplace-core").
The 'stdout_logfile' value is the log file. All parent directories must already exist.
### Facebook Duckling
- `$ apt-get install libpcre3-dev`
- `$ cd ..`
- `$ git clone https://github.com/facebook/duckling.git && cd duckling`
- Go to the directory in which you want to deploy the app (e.g. /var/www/html)
- `$ git clone https://github.com/facebook/duckling.git`
- `$ cd duckling`
- `$ curl -sSL https://get.haskellstack.org/ | sh`
- `$ stack build && stack exec duckling-example-exe`
- `$ stack build`
- `$ stack exec duckling-example-exe`
- `$ stack test`
### Facebook Duckling Supervisor config
Add a new Supervisor config file in the "/etc/supervisor/conf.d" path like in the example below:
Config file path: /etc/supervisor/conf.d/duckling-worker-search-and-displace-core-production.conf
```bash
[program:duckling-worker-search-and-displacecore-production]
process_name=%(program_name)s_%(process_num)02d
directory=/var/www/html/fb-duckling
command=sudo -S stack exec duckling-example-exe
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/var/log/queue/duckling-worker-search-and-displace-core-production.log
```
The value for the 'directory' key should reflect the Facebook Duckling app path (in the example above the path is "/var/www/html/fb-duckling").
The 'stdout_logfile' value is the log file. All parent directories must already exist.
### Converting documents from MD to ODT
- `$ apt-get install pandoc`

Loading…
Cancel
Save