From 527e4550d6d0786e93b454838caa3e8d68b76da5 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 25 Mar 2018 23:09:53 +0200 Subject: [PATCH] Unify CTS naming and nginx configuration for spotter-appmgr --- cts.sh | 8 ++------ cts/Dockerfile | 2 +- cts/docker/etc/nginx/nginx.conf | 2 +- cts/etc/init.d/cts | 5 ++++- cts/etc/nginx/conf.d/cts.conf | 11 ----------- 5 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 cts/etc/nginx/conf.d/cts.conf diff --git a/cts.sh b/cts.sh index 38f0b2f..ab714de 100755 --- a/cts.sh +++ b/cts.sh @@ -41,9 +41,5 @@ cp ${SOURCE_DIR}/etc/init.d/cts /etc/init.d/cts rc-update add cts service cts start -# Create nginx app definition -cp ${SOURCE_DIR}/etc/nginx/conf.d/cts.conf /etc/nginx/conf.d/cts.conf -service nginx reload - -# Add portal application definition -portal-app-manager cts "https://{host}:8406/" "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}" +# Add application definition +spotter-appmgr add-app cts "https://cts.{host}/" "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}" diff --git a/cts/Dockerfile b/cts/Dockerfile index d2ca52c..6cd350f 100644 --- a/cts/Dockerfile +++ b/cts/Dockerfile @@ -39,7 +39,7 @@ RUN \ COPY docker/ / VOLUME ["/srv/cts/cts/settings"] -EXPOSE 8006 +EXPOSE 8080 ENV DJANGO_SETTINGS_MODULE cts.settings.spotter WORKDIR /srv/cts diff --git a/cts/docker/etc/nginx/nginx.conf b/cts/docker/etc/nginx/nginx.conf index bce57c7..5868a4b 100644 --- a/cts/docker/etc/nginx/nginx.conf +++ b/cts/docker/etc/nginx/nginx.conf @@ -18,7 +18,7 @@ http { send_timeout 300; server { - listen 8006; + listen 8080; server_name localhost; location /robots.txt { diff --git a/cts/etc/init.d/cts b/cts/etc/init.d/cts index 78895a4..e1d93a2 100755 --- a/cts/etc/init.d/cts +++ b/cts/etc/init.d/cts @@ -12,11 +12,14 @@ start() { --name cts \ -h cts \ --link postgres \ - -p 127.0.0.1:8006:8006 \ -v /srv/cts/conf:/srv/cts/cts/settings \ cts } +start_post() { + /usr/local/bin/spotter-appmgr update-hosts cts +} + stop() { /usr/bin/docker stop cts } diff --git a/cts/etc/nginx/conf.d/cts.conf b/cts/etc/nginx/conf.d/cts.conf deleted file mode 100644 index 7aaf6a1..0000000 --- a/cts/etc/nginx/conf.d/cts.conf +++ /dev/null @@ -1,11 +0,0 @@ -server { - listen [::]:8806 ipv6only=off; - listen [::]:8406 ssl http2 ipv6only=off; - - access_log /var/log/nginx/cts.access.log; - error_log /var/log/nginx/cts.error.log; - - location / { - proxy_pass http://127.0.0.1:8006; - } -}