From 79cea15bca9652f8148445d6b08545d777482e26 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sat, 27 Jan 2018 22:35:55 +0100 Subject: [PATCH] Move Pandora from port 8011 to 8002 --- pandora.sh | 4 ++-- pandora/Dockerfile | 12 ++++++------ pandora/docker/etc/nginx/nginx.conf | 2 +- pandora/docker/etc/services.d/pandora-cron/run | 2 +- pandora/docker/etc/services.d/pandora-encoding/run | 2 +- pandora/docker/etc/services.d/pandora-tasks/run | 2 +- pandora/docker/etc/services.d/pandora/run | 2 +- pandora/etc/init.d/pandora | 2 +- pandora/etc/nginx/conf.d/pandora.conf | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pandora.sh b/pandora.sh index b815fd1..5a2bd2c 100755 --- a/pandora.sh +++ b/pandora.sh @@ -21,7 +21,7 @@ docker exec rabbitmq rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" " # Configure Pandora mkdir -p /srv/pandora/conf /srv/pandora/data -chown 8011:8011 /srv/pandora/data +chown 8002:8002 /srv/pandora/data cp ${SOURCE_DIR}/srv/pandora/conf/config.jsonc /srv/pandora/conf/config.jsonc cp ${SOURCE_DIR}/srv/pandora/conf/gunicorn_config.py /srv/pandora/conf/gunicorn_config.py envsubst <${SOURCE_DIR}/srv/pandora/conf/local_settings.py >/srv/pandora/conf/local_settings.py @@ -54,4 +54,4 @@ 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}:8411/" "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}" +portal-app-manager pandora "https://{host}:8402/" "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}" diff --git a/pandora/Dockerfile b/pandora/Dockerfile index 23b0306..59bdc8b 100644 --- a/pandora/Dockerfile +++ b/pandora/Dockerfile @@ -60,16 +60,16 @@ RUN \ && ./manage.py compile_pyc -p /srv/pandora/pandora \ && ./manage.py collectstatic -l --noinput \ # Create OS user - && addgroup -S -g 8011 pandora \ - && adduser -S -u 8011 -h /srv/pandora -s /bin/false -g pandora -G pandora pandora \ - && chown -R 8011:8011 /srv/pandora \ + && addgroup -S -g 8002 pandora \ + && adduser -S -u 8002 -h /srv/pandora -s /bin/false -g pandora -G pandora pandora \ + && chown -R 8002:8002 /srv/pandora \ # Cleanup && apk del .deps \ && find /srv/pandora -name '.git*' -exec rm -rf {} + \ && rm -rf /tmp/lib* /tmp/oxframe \ && rm -rf /root/.cache /root/.ox -COPY --chown=8011:8011 docker/srv/ /srv/ +COPY --chown=8002:8002 docker/srv/ /srv/ RUN \ # Update static files for Czech translation @@ -84,12 +84,12 @@ RUN \ && ln -s /srv/pandora/conf/config.jsonc config.jsonc \ && ln -s /srv/pandora/conf/gunicorn_config.py gunicorn_config.py \ && ln -s /srv/pandora/conf/local_settings.py local_settings.py \ - && chown -R 8011:8011 /srv/pandora + && chown -R 8002:8002 /srv/pandora COPY docker/etc/ /etc/ VOLUME ["/srv/pandora/conf", "/srv/pandora/data"] -EXPOSE 8011 +EXPOSE 8002 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 ceae07e..95fa09e 100644 --- a/pandora/docker/etc/nginx/nginx.conf +++ b/pandora/docker/etc/nginx/nginx.conf @@ -19,7 +19,7 @@ http { tcp_nodelay on; server { - listen 8011; + listen 8002; server_name localhost; location /favicon.ico { diff --git a/pandora/docker/etc/services.d/pandora-cron/run b/pandora/docker/etc/services.d/pandora-cron/run index 2988f74..d4012e9 100755 --- a/pandora/docker/etc/services.d/pandora-cron/run +++ b/pandora/docker/etc/services.d/pandora-cron/run @@ -3,5 +3,5 @@ cd /srv/pandora/pandora export HOME /srv/pandora fdmove -c 2 1 -s6-setuidgid 8011:8011 +s6-setuidgid 8002:8002 ./manage.py celerybeat -s /srv/pandora/data/celerybeat-schedule --pidfile pandora-cron.pid -l INFO diff --git a/pandora/docker/etc/services.d/pandora-encoding/run b/pandora/docker/etc/services.d/pandora-encoding/run index 59bc2c7..6b2f552 100755 --- a/pandora/docker/etc/services.d/pandora-encoding/run +++ b/pandora/docker/etc/services.d/pandora-encoding/run @@ -3,5 +3,5 @@ cd /srv/pandora/pandora export HOME /srv/pandora fdmove -c 2 1 -s6-setuidgid 8011:8011 +s6-setuidgid 8002:8002 ./manage.py celery worker -Q encoding -n pandora-encoding --pidfile pandora-encoding.pid --maxtasksperchild 500 -l INFO diff --git a/pandora/docker/etc/services.d/pandora-tasks/run b/pandora/docker/etc/services.d/pandora-tasks/run index bbb41af..099e5ac 100755 --- a/pandora/docker/etc/services.d/pandora-tasks/run +++ b/pandora/docker/etc/services.d/pandora-tasks/run @@ -3,5 +3,5 @@ cd /srv/pandora/pandora export HOME /srv/pandora fdmove -c 2 1 -s6-setuidgid 8011:8011 +s6-setuidgid 8002:8002 ./manage.py celery worker -Q default,celery -n pandora-default --pidfile pandora-tasks.pid --maxtasksperchild 1000 -l INFO diff --git a/pandora/docker/etc/services.d/pandora/run b/pandora/docker/etc/services.d/pandora/run index e7ce093..64ad108 100755 --- a/pandora/docker/etc/services.d/pandora/run +++ b/pandora/docker/etc/services.d/pandora/run @@ -3,5 +3,5 @@ cd /srv/pandora/pandora export HOME /srv/pandora fdmove -c 2 1 -s6-setuidgid 8011:8011 +s6-setuidgid 8002:8002 gunicorn -c gunicorn_config.py wsgi:application diff --git a/pandora/etc/init.d/pandora b/pandora/etc/init.d/pandora index d089ed4..35d7fcb 100755 --- a/pandora/etc/init.d/pandora +++ b/pandora/etc/init.d/pandora @@ -14,7 +14,7 @@ start() { -h pandora \ --link postgres \ --link rabbitmq \ - -p 127.0.0.1:9011:8011 \ + -p 127.0.0.1:9011:8002 \ -v /srv/pandora/conf:/srv/pandora/conf \ -v /srv/pandora/data:/srv/pandora/data \ pandora diff --git a/pandora/etc/nginx/conf.d/pandora.conf b/pandora/etc/nginx/conf.d/pandora.conf index a01a4e8..29c1669 100644 --- a/pandora/etc/nginx/conf.d/pandora.conf +++ b/pandora/etc/nginx/conf.d/pandora.conf @@ -1,6 +1,6 @@ server { - listen [::]:8011 ipv6only=off; - listen [::]:8411 ssl http2 ipv6only=off; + listen [::]:8002 ipv6only=off; + listen [::]:8402 ssl http2 ipv6only=off; access_log /var/log/nginx/pandora.access.log; error_log /var/log/nginx/pandora.error.log;