From 672777dd5eb766e343c593dbd46008c09d294dfa Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 25 Mar 2018 23:10:39 +0200 Subject: [PATCH] Unify GNU Health naming and nginx configuration for spotter-appmgr --- gnuhealth.sh | 10 +++------- gnuhealth/Dockerfile | 2 +- gnuhealth/etc/init.d/gnuhealth | 5 ++++- gnuhealth/etc/nginx/conf.d/gnuhealth.conf | 11 ----------- gnuhealth/srv/gnuhealth/conf/trytond.conf | 2 +- 5 files changed, 9 insertions(+), 21 deletions(-) delete mode 100644 gnuhealth/etc/nginx/conf.d/gnuhealth.conf diff --git a/gnuhealth.sh b/gnuhealth.sh index ba5f198..8d04cea 100755 --- a/gnuhealth.sh +++ b/gnuhealth.sh @@ -33,10 +33,6 @@ cp ${SOURCE_DIR}/etc/init.d/gnuhealth /etc/init.d/gnuhealth rc-update add gnuhealth service gnuhealth start -# Create nginx app definition -cp ${SOURCE_DIR}/etc/nginx/conf.d/gnuhealth.conf /etc/nginx/conf.d/gnuhealth.conf -service nginx reload - -# Add portal application definition -portal-app-manager gnuhealth "https://{host}:8408/index.html" admin "${GNUHEALTH_ADMIN_PWD}" -portal-app-manager gnuhealth-clients -p clienturl "{host}:8808" +# Add application definition +spotter-appmgr add-app gnuhealth "https://gnuhealth.{host}/index.html" admin "${GNUHEALTH_ADMIN_PWD}" +spotter-appmgr add-app gnuhealth-clients -p clienturl "gnuhealth.{host}" diff --git a/gnuhealth/Dockerfile b/gnuhealth/Dockerfile index dbd8786..1d05802 100644 --- a/gnuhealth/Dockerfile +++ b/gnuhealth/Dockerfile @@ -52,7 +52,7 @@ RUN \ && rm -rf /usr/local/share/.cache VOLUME ["/srv/gnuhealth/gnuhealth/tryton/server/config"] -EXPOSE 8008 +EXPOSE 8080 USER gnuhealth ENV PATH=/srv/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/bin:${PATH} \ diff --git a/gnuhealth/etc/init.d/gnuhealth b/gnuhealth/etc/init.d/gnuhealth index a8c37d2..f86c576 100755 --- a/gnuhealth/etc/init.d/gnuhealth +++ b/gnuhealth/etc/init.d/gnuhealth @@ -13,11 +13,14 @@ start() { -h gnuhealth \ --link postfix \ --link postgres \ - -p 127.0.0.1:8008:8008 \ -v /srv/gnuhealth/conf:/srv/gnuhealth/gnuhealth/tryton/server/config \ gnuhealth } +start_post() { + /usr/local/bin/spotter-appmgr update-hosts gnuhealth +} + stop() { /usr/bin/docker stop gnuhealth } diff --git a/gnuhealth/etc/nginx/conf.d/gnuhealth.conf b/gnuhealth/etc/nginx/conf.d/gnuhealth.conf deleted file mode 100644 index e444dbd..0000000 --- a/gnuhealth/etc/nginx/conf.d/gnuhealth.conf +++ /dev/null @@ -1,11 +0,0 @@ -server { - listen [::]:8808 ipv6only=off; - listen [::]:8408 ssl http2 ipv6only=off; - - access_log /var/log/nginx/gnuhealth.access.log; - error_log /var/log/nginx/gnuhealth.error.log; - - location / { - proxy_pass http://127.0.0.1:8008; - } -} diff --git a/gnuhealth/srv/gnuhealth/conf/trytond.conf b/gnuhealth/srv/gnuhealth/conf/trytond.conf index 4736224..be837b9 100644 --- a/gnuhealth/srv/gnuhealth/conf/trytond.conf +++ b/gnuhealth/srv/gnuhealth/conf/trytond.conf @@ -3,7 +3,7 @@ uri = postgresql://gnuhealth:${GNUHEALTH_PWD}@postgres path = /srv/gnuhealth/attach [web] -listen = 0.0.0.0:8008 +listen = 0.0.0.0:8080 root = /srv/gnuhealth/sao [webdav]