Move Pandora from port 8011 to 8002

This commit is contained in:
Disassembler 2018-01-27 22:35:55 +01:00
parent 5a67551dd4
commit 79cea15bca
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
9 changed files with 16 additions and 16 deletions

View File

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

View File

@ -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"]

View File

@ -19,7 +19,7 @@ http {
tcp_nodelay on;
server {
listen 8011;
listen 8002;
server_name localhost;
location /favicon.ico {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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