Install SAO Tryton web client along with GNU Health
This commit is contained in:
parent
d9ac613af6
commit
16331eb3d1
17
gnuhealth.sh
17
gnuhealth.sh
@ -5,12 +5,23 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))
|
||||
# Install dependencies for GNU Health
|
||||
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
|
||||
tar xzf /tmp/gnuhealth.tgz -C /srv
|
||||
mv /srv/gnuhealth-3.2.8 /srv/gnuhealth
|
||||
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
|
||||
virtualenv --system-site-packages -p /usr/bin/python3 /srv/gnuhealth
|
||||
echo '. /srv/gnuhealth/bin/activate' >/srv/gnuhealth/.bash_profile
|
||||
@ -28,6 +39,10 @@ chown -R gnuhealth:gnuhealth /srv/gnuhealth
|
||||
# Install GNU Health
|
||||
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
|
||||
envsubst <${SOURCE_DIR}/gnuhealth/srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf >/srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf
|
||||
|
||||
|
@ -4,7 +4,11 @@ path = /srv/gnuhealth/attach
|
||||
|
||||
[web]
|
||||
listen = 0.0.0.0:8006
|
||||
root = /srv/gnuhealth/sao
|
||||
|
||||
[webdav]
|
||||
listen = *:8080
|
||||
ssl_webdav = False
|
||||
|
||||
[email]
|
||||
from = gnuhealth@spotter.ngo
|
||||
|
Loading…
Reference in New Issue
Block a user