From 0255878ceda75299ac5366843b672d9058895153 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 25 Mar 2018 23:21:24 +0200 Subject: [PATCH] Unify Sigmah naming and nginx configuration for spotter-appmgr --- sigmah.sh | 8 ++------ sigmah/Dockerfile | 4 +--- sigmah/etc/init.d/sigmah | 5 ++++- sigmah/etc/nginx/conf.d/sigmah.conf | 11 ----------- 4 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 sigmah/etc/nginx/conf.d/sigmah.conf diff --git a/sigmah.sh b/sigmah.sh index 8f70cfe..e3fc4e0 100755 --- a/sigmah.sh +++ b/sigmah.sh @@ -47,9 +47,5 @@ cp ${SOURCE_DIR}/etc/init.d/sigmah /etc/init.d/sigmah rc-update add sigmah service sigmah start -# Create nginx app definition -cp ${SOURCE_DIR}/etc/nginx/conf.d/sigmah.conf /etc/nginx/conf.d/sigmah.conf -service nginx reload - -# Add portal application definition -portal-app-manager sigmah "https://{host}:8411/sigmah/" "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}" +# Add application definition +spotter-appmgr add-app sigmah "https://sigmah.{host}/sigmah/" "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}" diff --git a/sigmah/Dockerfile b/sigmah/Dockerfile index 3e50b41..821f725 100644 --- a/sigmah/Dockerfile +++ b/sigmah/Dockerfile @@ -11,8 +11,6 @@ RUN \ && wget https://jdbc.postgresql.org/download/postgresql-42.2.0.jar -O /srv/tomcat/webapps/sigmah/WEB-INF/lib/postgresql-42.2.0.jar \ # Remove logging config && rm /srv/tomcat/webapps/sigmah/WEB-INF/classes/logback.xml \ - # Configure Tomcat port - && sed -i 's/port="8080"/port="8011"/g' /srv/tomcat/conf/server.xml \ # Create OS user && addgroup -S -g 8011 sigmah \ && adduser -S -u 8011 -h /srv/tomcat -s /bin/false -g sigmah -G sigmah sigmah \ @@ -23,7 +21,7 @@ RUN \ COPY docker/ / VOLUME ["/srv/sigmah/data"] -EXPOSE 8011 +EXPOSE 8080 USER sigmah WORKDIR /srv/tomcat diff --git a/sigmah/etc/init.d/sigmah b/sigmah/etc/init.d/sigmah index 1bf040b..7e3e68b 100755 --- a/sigmah/etc/init.d/sigmah +++ b/sigmah/etc/init.d/sigmah @@ -13,13 +13,16 @@ start() { -h sigmah \ --link postfix \ --link postgres \ - -p 127.0.0.1:8011:8011 \ -v /srv/sigmah/data:/srv/sigmah/data \ -v /srv/sigmah/conf/persistence.xml:/srv/tomcat/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml \ -v /srv/sigmah/conf/sigmah.properties:/srv/tomcat/webapps/sigmah/WEB-INF/classes/sigmah.properties \ sigmah } +start_post() { + /usr/local/bin/spotter-appmgr update-hosts sigmah +} + stop() { /usr/bin/docker stop sigmah } diff --git a/sigmah/etc/nginx/conf.d/sigmah.conf b/sigmah/etc/nginx/conf.d/sigmah.conf deleted file mode 100644 index 810dc54..0000000 --- a/sigmah/etc/nginx/conf.d/sigmah.conf +++ /dev/null @@ -1,11 +0,0 @@ -server { - listen [::]:8811 ipv6only=off; - listen [::]:8411 ssl http2 ipv6only=off; - - access_log /var/log/nginx/sigmah.access.log; - error_log /var/log/nginx/sigmah.error.log; - - location / { - proxy_pass http://127.0.0.1:8011; - } -}