Upgrade GNU Health to 3.4.0
This commit is contained in:
parent
d0751b1f2c
commit
98e87aa772
@ -14,13 +14,12 @@ RUN EOF
|
|||||||
apk --no-cache add --virtual .deps build-base git libffi-dev libjpeg-turbo-dev libxml2-dev libxslt-dev ncurses npm patch postgresql-dev python3-dev sudo
|
apk --no-cache add --virtual .deps build-base git libffi-dev libjpeg-turbo-dev libxml2-dev libxslt-dev ncurses npm patch postgresql-dev python3-dev sudo
|
||||||
|
|
||||||
# Download GNU Health
|
# Download GNU Health
|
||||||
wget http://ftp.gnu.org/gnu/health/gnuhealth-3.2.10.tar.gz -O /tmp/gnuhealth.tgz
|
wget http://ftp.gnu.org/gnu/health/gnuhealth-3.4.0.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.10 /srv/gnuhealth
|
mv /srv/gnuhealth-3.4.0 /srv/install
|
||||||
rm -f /tmp/gnuhealth.tgz
|
|
||||||
|
|
||||||
# Clone Sao (Tryton web client) repository
|
# Clone Sao (Tryton web client) repository
|
||||||
git clone -b 4.2 --single-branch --depth 1 https://github.com/tryton/sao /srv/gnuhealth/sao
|
git clone -b 4.6 --single-branch --depth 1 https://github.com/tryton/sao /srv/gnuhealth/sao
|
||||||
|
|
||||||
# Create OS user
|
# Create OS user
|
||||||
addgroup -S -g 8008 gnuhealth
|
addgroup -S -g 8008 gnuhealth
|
||||||
@ -28,31 +27,34 @@ RUN EOF
|
|||||||
chown -R gnuhealth:gnuhealth /srv/gnuhealth
|
chown -R gnuhealth:gnuhealth /srv/gnuhealth
|
||||||
|
|
||||||
# Install GNU Health
|
# Install GNU Health
|
||||||
cd /srv/gnuhealth
|
cd /srv/install
|
||||||
sudo -u gnuhealth ./gnuhealth-setup install
|
sudo -u gnuhealth ./gnuhealth-setup install
|
||||||
|
|
||||||
|
# Hackfix extraneous pymongo requirement
|
||||||
|
sed -i '/pymongo/d' /srv/gnuhealth/gnuhealth/tryton/server/modules/health_federation/health_federation.py
|
||||||
|
|
||||||
# Hackfix template1 database lock
|
# Hackfix template1 database lock
|
||||||
sed -i 's/template1/gnuhealth/g' /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.2.20/trytond/backend/postgresql/database.py
|
sed -i 's/template1/gnuhealth/g' /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.6.13/trytond/backend/postgresql/database.py
|
||||||
|
|
||||||
# Install Sao (Tryton web client) dependencies
|
# Install Sao (Tryton web client) dependencies
|
||||||
cd /srv/gnuhealth/sao
|
cd /srv/gnuhealth/sao
|
||||||
sudo -u gnuhealth npm install grunt grunt-cli grunt-contrib-concat grunt-contrib-jshint grunt-contrib-uglify grunt-contrib-less grunt-po2json
|
|
||||||
sudo -u gnuhealth npm install --production
|
sudo -u gnuhealth npm install --production
|
||||||
sudo -u gnuhealth ./node_modules/.bin/grunt
|
sudo -u gnuhealth ./node_modules/grunt-cli/bin/grunt
|
||||||
|
|
||||||
# Download Demo database
|
# Download Demo database
|
||||||
wget http://health.gnu.org/downloads/postgres_dumps/gnuhealth-32-demo.sql.gz -O /srv/gnuhealth/gnuhealth_demo.sql.gz
|
wget http://health.gnu.org/downloads/postgres_dumps/gnuhealth-34-demo.sql.gz -O /srv/gnuhealth/gnuhealth_demo.sql.gz
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
apk --no-cache del .deps
|
apk --no-cache del .deps
|
||||||
find /srv/gnuhealth -name '.git*' -exec rm -rf {} +
|
find /srv/gnuhealth -name '.git*' -exec rm -rf {} +
|
||||||
rm -rf /usr/local/share/.cache
|
rm -rf /srv/install
|
||||||
|
rm -f /tmp/gnuhealth.tgz
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
MOUNT DIR /srv/gnuhealth/conf srv/gnuhealth/gnuhealth/tryton/server/config
|
MOUNT DIR /srv/gnuhealth/conf srv/gnuhealth/gnuhealth/tryton/server/config
|
||||||
|
|
||||||
USER 8008 8008
|
USER 8008 8008
|
||||||
ENV PATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.2.20/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
ENV PATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.6.13/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
ENV TRYTOND_CONFIG /srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf
|
ENV TRYTOND_CONFIG /srv/gnuhealth/gnuhealth/tryton/server/config/trytond.conf
|
||||||
ENV PYTHONPATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.2.20:/srv/gnuhealth/gnuhealth/tryton/server/config
|
ENV PYTHONPATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.6.13:/srv/gnuhealth/gnuhealth/tryton/server/config
|
||||||
CMD trytond --verbose
|
CMD trytond --verbose
|
||||||
|
Loading…
Reference in New Issue
Block a user