From 71ab395bff601ff2579a9eef90b6e524c18e39ec Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 25 Mar 2018 23:18:24 +0200 Subject: [PATCH] Unify Pandora naming and nginx configuration for spotter-appmgr --- pandora.sh | 8 ++------ pandora/Dockerfile | 2 +- pandora/docker/etc/nginx/nginx.conf | 2 +- pandora/etc/init.d/pandora | 5 ++++- pandora/etc/nginx/conf.d/pandora.conf | 11 ----------- 5 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 pandora/etc/nginx/conf.d/pandora.conf diff --git a/pandora.sh b/pandora.sh index a9ed3b3..6c22fc2 100755 --- a/pandora.sh +++ b/pandora.sh @@ -56,9 +56,5 @@ cp ${SOURCE_DIR}/etc/init.d/pandora /etc/init.d/pandora rc-update add pandora service pandora start -# Create nginx app definition -cp ${SOURCE_DIR}/etc/nginx/conf.d/pandora.conf /etc/nginx/conf.d/pandora.conf -service nginx reload - -# Add portal application definition -portal-app-manager pandora "https://{host}:8402/" "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}" +# Add application definition +spotter-appmgr add-app pandora "https://pandora.{host}/" "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}" diff --git a/pandora/Dockerfile b/pandora/Dockerfile index 362206d..ea99230 100644 --- a/pandora/Dockerfile +++ b/pandora/Dockerfile @@ -89,7 +89,7 @@ RUN \ COPY docker/etc/ /etc/ VOLUME ["/srv/pandora/conf", "/srv/pandora/data"] -EXPOSE 8002 +EXPOSE 8080 WORKDIR /srv/pandora CMD ["s6-svscan", "/etc/services.d"] diff --git a/pandora/docker/etc/nginx/nginx.conf b/pandora/docker/etc/nginx/nginx.conf index 2a89f83..43929c2 100644 --- a/pandora/docker/etc/nginx/nginx.conf +++ b/pandora/docker/etc/nginx/nginx.conf @@ -18,7 +18,7 @@ http { send_timeout 300; server { - listen 8002; + listen 8080; server_name localhost; location /favicon.ico { diff --git a/pandora/etc/init.d/pandora b/pandora/etc/init.d/pandora index 25bf1e9..d49ddd7 100755 --- a/pandora/etc/init.d/pandora +++ b/pandora/etc/init.d/pandora @@ -14,12 +14,15 @@ start() { --link postfix \ --link postgres \ --link rabbitmq \ - -p 127.0.0.1:8002:8002 \ -v /srv/pandora/conf:/srv/pandora/conf \ -v /srv/pandora/data:/srv/pandora/data \ pandora } +start_post() { + /usr/local/bin/spotter-appmgr update-hosts pandora +} + stop() { /usr/bin/docker stop pandora } diff --git a/pandora/etc/nginx/conf.d/pandora.conf b/pandora/etc/nginx/conf.d/pandora.conf deleted file mode 100644 index 236197a..0000000 --- a/pandora/etc/nginx/conf.d/pandora.conf +++ /dev/null @@ -1,11 +0,0 @@ -server { - listen [::]:8802 ipv6only=off; - listen [::]:8402 ssl http2 ipv6only=off; - - access_log /var/log/nginx/pandora.access.log; - error_log /var/log/nginx/pandora.error.log; - - location / { - proxy_pass http://127.0.0.1:8002; - } -}