Deployment - Pastafarians/linguine GitHub Wiki
NOTE: Please see this page for Linguine's current version.
Deployment on a server is very similar to deployment on a local machine, but with a few tweaks for enhanced logging and performance.
Configure environment vars via export"<VAR_NAME>"=<VALUE>
:
NODE_ENV
: Configures which database instance to use. Make sure it remains on development
LINGUINE_THREADS
: Configure how many threads are used in the analysis thread pool by the Python server. Make sure this value is under 10 to avoid memory leaks
LINGUINE_MAX_FILESIZE_KB
: Determines how large of a corpus can be uploaded. Defaults to 35
(kb: Approx 500 words)
Systemd is an awesome tool to manage the uptime of server instances and processes. It is not required to run a production instance of linguine, but is used to drive nlp.rit.edu
All systemd jobs that the app uses are located in the base root of the linguine repository under scripts.
.service files can be used by systemd as documented here
First, make sure MongoDB is running as documented. Then:
sudo service linguine-node restart
sudo service linguine-python restart
journalctl
can be used to check the logs of running processes on a linux or unix system. queries beginning at the most recent logs for the linguine node or python services are as follows:
sudo journalctl -u linguine-node -f
or
sudo journalctl -u linguine-python -f
There are many params you can pass to journalctl for more fancy log queries. Here is a brief tutorial if you're interested.
Just clone and configure an instance of linguine as described in the local development guide found here.