From b60b8bfd4ce37f73b1726cafa8ca3d94c713771d Mon Sep 17 00:00:00 2001 From: "emilian.mitocariu" Date: Thu, 20 Oct 2022 14:56:47 +0000 Subject: [PATCH] Update 'README.md' --- README.md | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9affc80..2132289 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ --- **NOTE** -The installation steps below were tested on an Ubuntu 20.04 LTS machine and should be adapted for each specific environment. +The installation steps below were tested on an Ubuntu 20.04 LTS machine, all commands assume sudo being used unless specified otherwise and should be adapted for each specific environment. + +Disk size for this service should be at least 15GB. --- @@ -59,6 +61,7 @@ a2enmod \ alias \ proxy_fcgi \ remoteip && \ +sed -i "s/DocumentRoot \/var\/www\/html/DocumentRoot \/var\/www\/html\/searchanddisplace-core\/public/g" /etc/apache2/sites-available/000-default.conf && \ sed -i "/^[[:blank:]]ErrorLog/i\ " /etc/apache2/sites-available/000-default.conf && \ sed -i "/^[[:blank:]]ErrorLog/i\ SetHandler \"proxy:unix:\/var\/run\/php\/php7.4-fpm.sock|fcgi:\/\/localhost\"" /etc/apache2/sites-available/000-default.conf && \ sed -i "/^[[[:blank:]]ErrorLog/i\ " /etc/apache2/sites-available/000-default.conf && \ @@ -86,6 +89,16 @@ apt-get -y install \ yarn ``` +### Install and Configure the app +- Download the app + +``` +cd /var/www/html && \ +git clone https://git.law/newroco/searchanddisplace-core.git && \ +chown -R www-data:www-data searchanddisplace-core && \ +cd searchanddisplace-core +``` + - Create the `.env` file by copying the contents from the `.env.example` file. `cp .env.example .env` @@ -94,8 +107,7 @@ apt-get -y install \ then you need to make sure that it is installed on your machine. ``` -apt-get -y install \ -redis-server +apt-get -y install redis-server ``` - Install the `Search and Displace Ingest` app, found here https://git.law/newroco/searchanddisplace-ingest @@ -123,6 +135,7 @@ npm install - Migrate DB tables ``` touch ./database/database.sqlite +chown www-data:www-data ./database/database.sqlite php artisan migrate ``` @@ -170,7 +183,7 @@ git clone https://github.com/facebook/duckling.git fb-duckling && \ cd fb-duckling && \ curl -sSL https://get.haskellstack.org/ | sh && \ stack build && \ -# stack exec duckling-example-exe && \ +stack exec duckling-example-exe && \ stack test ``` @@ -193,6 +206,21 @@ The value for the **directory** key should reflect the Facebook Duckling app pat The **stdout_logfile** value is the log file. All parent directories must already exist. + +### Start the queue worker and Facebook Duckling with Supervisor + +``` +supervisorctl reread +supervisorctl update +supervisorctl start all +``` + +- Check they are running + +``` +supervisorctl status +``` + ### Converting documents ``` # LibreOffice