Unify Sigmah naming and nginx configuration for spotter-appmgr

This commit is contained in:
Disassembler 2018-03-25 23:21:24 +02:00
parent 2d3465c59d
commit 0255878ced
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
4 changed files with 7 additions and 21 deletions

View File

@ -47,9 +47,5 @@ cp ${SOURCE_DIR}/etc/init.d/sigmah /etc/init.d/sigmah
rc-update add sigmah rc-update add sigmah
service sigmah start service sigmah start
# Create nginx app definition # Add application definition
cp ${SOURCE_DIR}/etc/nginx/conf.d/sigmah.conf /etc/nginx/conf.d/sigmah.conf spotter-appmgr add-app sigmah "https://sigmah.{host}/sigmah/" "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}"
service nginx reload
# Add portal application definition
portal-app-manager sigmah "https://{host}:8411/sigmah/" "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}"

View File

@ -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 \ && 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 # Remove logging config
&& rm /srv/tomcat/webapps/sigmah/WEB-INF/classes/logback.xml \ && 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 # Create OS user
&& addgroup -S -g 8011 sigmah \ && addgroup -S -g 8011 sigmah \
&& adduser -S -u 8011 -h /srv/tomcat -s /bin/false -g sigmah -G sigmah sigmah \ && adduser -S -u 8011 -h /srv/tomcat -s /bin/false -g sigmah -G sigmah sigmah \
@ -23,7 +21,7 @@ RUN \
COPY docker/ / COPY docker/ /
VOLUME ["/srv/sigmah/data"] VOLUME ["/srv/sigmah/data"]
EXPOSE 8011 EXPOSE 8080
USER sigmah USER sigmah
WORKDIR /srv/tomcat WORKDIR /srv/tomcat

View File

@ -13,13 +13,16 @@ start() {
-h sigmah \ -h sigmah \
--link postfix \ --link postfix \
--link postgres \ --link postgres \
-p 127.0.0.1:8011:8011 \
-v /srv/sigmah/data:/srv/sigmah/data \ -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/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 \ -v /srv/sigmah/conf/sigmah.properties:/srv/tomcat/webapps/sigmah/WEB-INF/classes/sigmah.properties \
sigmah sigmah
} }
start_post() {
/usr/local/bin/spotter-appmgr update-hosts sigmah
}
stop() { stop() {
/usr/bin/docker stop sigmah /usr/bin/docker stop sigmah
} }

View File

@ -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;
}
}