From 193a80ad5cf9f496ce3c417fcb67f8cca2f06370 Mon Sep 17 00:00:00 2001 From: Orzu Ionut Date: Fri, 20 Aug 2021 10:08:29 +0300 Subject: [PATCH] Updated README --- .env.example | 5 ++++- README.md | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index cbe5d55..554a21c 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,8 @@ APP_URL=http://localhost LOG_CHANNEL=daily +DB_CONNECTION=sqlite + BROADCAST_DRIVER=log CACHE_DRIVER=file QUEUE_CONNECTION=sync @@ -15,8 +17,9 @@ SESSION_LIFETIME=120 REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 +REDIS_QUEUE= -SD_DUCKLING_URL= +SD_DUCKLING_URL=http://0.0.0.0:8000/parse SD_INGEST_URL= WEBHOOK_CLIENT_SECRET= diff --git a/README.md b/README.md index c29d619..5afec42 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,43 @@ # Search and Displace Core ## Install -### Search and Displace Ingest integration -Add in .env the 'WEBHOOK_CLIENT_SECRET' value. +- Create the `.env` file by copying the contents from the `.env.example` file. + +`cp .env.example .env` + +- Generate the app key by running the following command: + +`php artisan key:generate` + +- Install the 'sqlite' driver for your PHP version if it is not already installed. + +- For the 'QUEUE_CONNECTION' variable in `.env` you can use either `sync` or `redis` (recommended). If you choose to use `redis` +then you need to make sure that it is installed on your machine. + +`apt update` + +`apt install redis-server` + +- Install the `Search and Displace Ingest` app, found here https://git.law/newroco/searchanddisplace-ingest +- Get the URL of the `Search and Displace Ingest` app and add it to the `SD_INGEST_URL` variable in `.env` +- Add in `.env` the `WEBHOOK_CLIENT_SECRET` value which needs to be the same value as the `WEBHOOK_CORE_SECRET` in +the `Search and Displace Ingest` app `.env` file +- Add in `.env` the `SD_DUCKLING_URL` value which by default is `http://0.0.0.0:8000/parse`. You can find +details about installing Facebook Duckling in a section below. + +- Install composer +- Install composer dependencies + +`composer install` + +- Install NodeJS and npm +- Install npm dependencies + +`npm install` + +- Compile frontend assets + +`npm run dev` or `npm run watch` if you want to run a watcher ### Facebook Duckling - `$ apt-get install libpcre3-dev`