Install SAO Tryton web client along with GNU Health

This commit is contained in:
Disassembler 2017-12-03 19:43:50 +01:00
parent d9ac613af6
commit 16331eb3d1
2 changed files with 20 additions and 1 deletions

View File

@ -5,12 +5,23 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))
# Install dependencies for GNU Health # Install dependencies for GNU Health
apt-get -y --no-install-recommends install python3 python3-virtualenv virtualenv apt-get -y --no-install-recommends install python3 python3-virtualenv virtualenv
# Donwload GNU Health # Add NodeJS repository for SAO (Tryton web client)
wget https://deb.nodesource.com/gpgkey/nodesource.gpg.key -O - | apt-key add -
echo 'deb https://deb.nodesource.com/node_8.x xenial main' > /etc/apt/sources.list.d/nodejs.list
apt-get -y update
# Install dependencies for SAO (Tryton web client)
apt-get -y --no-install-recommends install nodejs
# Download GNU Health
wget http://ftp.gnu.org/gnu/health/gnuhealth-3.2.8.tar.gz -O /tmp/gnuhealth.tgz wget http://ftp.gnu.org/gnu/health/gnuhealth-3.2.8.tar.gz -O /tmp/gnuhealth.tgz
tar xzf /tmp/gnuhealth.tgz -C /srv tar xzf /tmp/gnuhealth.tgz -C /srv
mv /srv/gnuhealth-3.2.8 /srv/gnuhealth mv /srv/gnuhealth-3.2.8 /srv/gnuhealth
rm -f /tmp/gnuhealth.tgz rm -f /tmp/gnuhealth.tgz
# Clone SAO (Tryton web client) repository
git clone --depth 1 https://github.com/tryton/sao /srv/gnuhealth/sao
# Create Python virtualenv # Create Python virtualenv
virtualenv --system-site-packages -p /usr/bin/python3 /srv/gnuhealth virtualenv --system-site-packages -p /usr/bin/python3 /srv/gnuhealth
echo '. /srv/gnuhealth/bin/activate' >/srv/gnuhealth/.bash_profile echo '. /srv/gnuhealth/bin/activate' >/srv/gnuhealth/.bash_profile
@ -28,6 +39,10 @@ chown -R gnuhealth:gnuhealth /srv/gnuhealth
# Install GNU Health # Install GNU Health
sudo -u gnuhealth -i /srv/gnuhealth/gnuhealth-setup install sudo -u gnuhealth -i /srv/gnuhealth/gnuhealth-setup install
# Install SAO (Tryton web client)
sudo -u gnuhealth npm install --production --prefix /srv/gnuhealth/sao
sudo -u gnuhealth bash -c 'cd /srv/gnuhealth/sao && /srv/gnuhealth/sao/node_modules/grunt-cli/bin/grunt'
# Configure GNU Health # Configure GNU Health
envsubst <${SOURCE_DIR}/gnuhealth/srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf >/srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf envsubst <${SOURCE_DIR}/gnuhealth/srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf >/srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf

View File

@ -4,7 +4,11 @@ path = /srv/gnuhealth/attach
[web] [web]
listen = 0.0.0.0:8006 listen = 0.0.0.0:8006
root = /srv/gnuhealth/sao
[webdav] [webdav]
listen = *:8080 listen = *:8080
ssl_webdav = False ssl_webdav = False
[email]
from = gnuhealth@spotter.ngo