From f1c5e18cd96be8939d614a1cfb2b7b128b13fc53 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 25 Mar 2018 22:59:42 +0200 Subject: [PATCH] Unify CrisisCleanup naming and nginx configuration for spotter-appmgr --- crisiscleanup.sh | 8 ++------ crisiscleanup/Dockerfile | 2 +- crisiscleanup/etc/init.d/crisiscleanup | 5 ++++- crisiscleanup/etc/nginx/conf.d/crisiscleanup.conf | 11 ----------- crisiscleanup/srv/crisiscleanup/conf/boot.rb | 2 +- 5 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 crisiscleanup/etc/nginx/conf.d/crisiscleanup.conf diff --git a/crisiscleanup.sh b/crisiscleanup.sh index 11296a8..435c309 100755 --- a/crisiscleanup.sh +++ b/crisiscleanup.sh @@ -40,9 +40,5 @@ cp ${SOURCE_DIR}/etc/init.d/crisiscleanup /etc/init.d/crisiscleanup rc-update add crisiscleanup service crisiscleanup start -# Create nginx app definition -cp ${SOURCE_DIR}/etc/nginx/conf.d/crisiscleanup.conf /etc/nginx/conf.d/crisiscleanup.conf -service nginx reload - -# Add portal application definition -portal-app-manager crisis-cleanup "https://{host}:8405/" "${CRISISCLEANUP_ADMIN_EMAIL}" "${CRISISCLEANUP_ADMIN_PWD}" +# Add application definition +spotter-appmgr add-app crisiscleanup "https://crisiscleanup.{host}/" "${CRISISCLEANUP_ADMIN_EMAIL}" "${CRISISCLEANUP_ADMIN_PWD}" diff --git a/crisiscleanup/Dockerfile b/crisiscleanup/Dockerfile index 2e93389..a4e59ca 100644 --- a/crisiscleanup/Dockerfile +++ b/crisiscleanup/Dockerfile @@ -44,7 +44,7 @@ RUN \ && rm -rf /root/.bundle /root/.config /root/.npm VOLUME ["/srv/crisiscleanup/config"] -EXPOSE 8005 +EXPOSE 8080 USER crisiscleanup WORKDIR /srv/crisiscleanup diff --git a/crisiscleanup/etc/init.d/crisiscleanup b/crisiscleanup/etc/init.d/crisiscleanup index 577fb8c..291f67f 100755 --- a/crisiscleanup/etc/init.d/crisiscleanup +++ b/crisiscleanup/etc/init.d/crisiscleanup @@ -13,11 +13,14 @@ start() { -h crisiscleanup \ --link postfix \ --link postgres \ - -p 127.0.0.1:8005:8005 \ -v /srv/crisiscleanup/conf:/srv/crisiscleanup/config \ crisiscleanup } +start_post() { + /usr/local/bin/spotter-appmgr update-hosts crisiscleanup +} + stop() { /usr/bin/docker stop crisiscleanup } diff --git a/crisiscleanup/etc/nginx/conf.d/crisiscleanup.conf b/crisiscleanup/etc/nginx/conf.d/crisiscleanup.conf deleted file mode 100644 index a8a1d82..0000000 --- a/crisiscleanup/etc/nginx/conf.d/crisiscleanup.conf +++ /dev/null @@ -1,11 +0,0 @@ -server { - listen [::]:8805 ipv6only=off; - listen [::]:8405 ssl http2 ipv6only=off; - - access_log /var/log/nginx/crisiscleanup.access.log; - error_log /var/log/nginx/crisiscleanup.error.log; - - location / { - proxy_pass http://127.0.0.1:8005; - } -} diff --git a/crisiscleanup/srv/crisiscleanup/conf/boot.rb b/crisiscleanup/srv/crisiscleanup/conf/boot.rb index b73a01a..0abb66f 100644 --- a/crisiscleanup/srv/crisiscleanup/conf/boot.rb +++ b/crisiscleanup/srv/crisiscleanup/conf/boot.rb @@ -9,7 +9,7 @@ module Rails class Server alias :default_options_bk :default_options def default_options - default_options_bk.merge!(Host: '0.0.0.0', Port: 8005) + default_options_bk.merge!(Host: '0.0.0.0', Port: 8080) end end end