Fix GNU Health build via symlink to current version of trytond

This commit is contained in:
Disassembler 2019-10-05 23:09:59 +02:00
parent 466a83e407
commit 3a3552f154
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

View File

@ -14,7 +14,6 @@ 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
# Download GNU Health
# To get the matching trytond version, check latest trytond-<version>.tar.gz on http://downloads.tryton.org/4.6/
wget http://ftp.gnu.org/gnu/health/gnuhealth-3.4.1.tar.gz -O /tmp/gnuhealth.tgz
tar xzf /tmp/gnuhealth.tgz -C /srv
mv /srv/gnuhealth-3.4.1 /srv/install
@ -34,11 +33,14 @@ RUN EOF
cd /srv/install
sudo -u gnuhealth ./gnuhealth-setup install
# Create symlink for the current version of trytond
ln -s /srv/gnuhealth/gnuhealth/tryton/server/trytond-* /srv/gnuhealth/gnuhealth/tryton/server/trytond-current
# Hackfix extraneous pymongo requirement
sed -i '/pymongo/d' /srv/gnuhealth/gnuhealth/tryton/server/modules/health_federation/health_federation.py
# Hackfix template1 database lock
sed -i 's/template1/gnuhealth/g' /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.6.15/trytond/backend/postgresql/database.py
sed -i 's/template1/gnuhealth/g' /srv/gnuhealth/gnuhealth/tryton/server/trytond-current/trytond/backend/postgresql/database.py
# Install Sao (Tryton web client) dependencies
cd /srv/gnuhealth/sao
@ -55,9 +57,9 @@ RUN EOF
rm -f /tmp/gnuhealth.tgz
EOF
ENV PATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.6.15/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-current/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 PYTHONPATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-4.6.15:/srv/gnuhealth/gnuhealth/tryton/server/config
ENV PYTHONPATH /srv/gnuhealth/gnuhealth/tryton/server/trytond-current:/srv/gnuhealth/gnuhealth/tryton/server/config
USER 8008 8008
CMD trytond --verbose