From 76bb02dc78fa3d4df9cbccc773824983d8961651 Mon Sep 17 00:00:00 2001 From: Lan Le Date: Tue, 18 Jun 2024 14:18:52 +0200 Subject: [PATCH] docs: update automatic startup info --- INSTALL.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 928410ca..a3694953 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -149,6 +149,26 @@ logger.error('message to log') ``` Note: You need to use function as the same as your logger level, which named as lowercased of level's name, to write your log message to the logs file + +### 2.3. Automatic startup in crontab + +To make sure ChemSpectra is started on reboot you can use this BASH script in your root crontab (if required, adapt Chemotion ELN username and home directory): + +```sh +#!/bin/bash + +sudo -H -u production bash -c "cd /home/production/chem-spectra-app && \ + source /home/production/anaconda3/bin/activate chem-spectra && \ + gunicorn -w 4 -b 0.0.0.0:3007 server:app --daemon" + +# Remember to modify path according to your installation +docker run --detach --name msconvert_docker \ + --rm -it \ + -e WINEDEBUG=-all \ + -v /home/production/chem-spectra-app/chem_spectra/tmp:/data chambm/pwiz-skyline-i-agree-to-the-vendor-licenses \ + bash +``` + ## 3. Run test ```