diff --git a/build/build-all.sh b/build/build-all.sh index ed9486e..fab88d6 100755 --- a/build/build-all.sh +++ b/build/build-all.sh @@ -34,7 +34,6 @@ spoc-image build -p alpine3.8-ruby2.4/image spoc-image build -p alpine3.10/image spoc-image build -p alpine3.10-nodejs10/image spoc-image build -p alpine3.10-python2.7/image -spoc-image build -p alpine3.10-python3.7/image spoc-image build -p alpine3.11/image spoc-image build -p alpine3.11-java8/image spoc-image build -p alpine3.11-php7.3/image diff --git a/lxc-shared/alpine3.10-python3.7/image b/extra/graveyard/alpine3.10-python3.7/image similarity index 100% rename from lxc-shared/alpine3.10-python3.7/image rename to extra/graveyard/alpine3.10-python3.7/image diff --git a/lxc-apps/pandora/image b/lxc-apps/pandora/image index eee17f0..4885f66 100644 --- a/lxc-apps/pandora/image +++ b/lxc-apps/pandora/image @@ -1,6 +1,5 @@ IMAGE pandora_0.0.1-200621 -FROM alpine3.10-python3.7_3.7.7-200621 -# Django required by Pandora requires psycopg<=2.7.7 which does not compile under python3.8 +FROM alpine3.11-python3.8_3.8.2-200621 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/pandora/image.d/etc/nginx/nginx.conf b/lxc-apps/pandora/image.d/etc/nginx/nginx.conf index 84c1e4c..3a1eff2 100644 --- a/lxc-apps/pandora/image.d/etc/nginx/nginx.conf +++ b/lxc-apps/pandora/image.d/etc/nginx/nginx.conf @@ -36,6 +36,19 @@ http { root /srv/pandora; } + # Websockets currently not proxied by container host reverse proxy + location /api/ws/ { + proxy_http_version 1.1; + proxy_set_header Host $http_host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Proxy ""; + proxy_redirect off; + proxy_buffering off; + proxy_read_timeout 99999; + proxy_pass http://127.0.0.1:2622/; + } + location / { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Host $http_host; diff --git a/lxc-apps/pandora/image.d/etc/services.d/pandora-cron/run b/lxc-apps/pandora/image.d/etc/services.d/pandora-cron/run index 6fa42b0..fa6d82b 100755 --- a/lxc-apps/pandora/image.d/etc/services.d/pandora-cron/run +++ b/lxc-apps/pandora/image.d/etc/services.d/pandora-cron/run @@ -2,6 +2,7 @@ cd /srv/pandora/pandora export HOME /srv/pandora +export COLUMNS 80 # Workaround for https://github.com/celery/celery/issues/5761 fdmove -c 2 1 s6-setuidgid pandora /usr/bin/celery -A app beat -s /srv/pandora/data/celerybeat-schedule -l INFO diff --git a/lxc-apps/pandora/image.d/etc/services.d/pandora-encoding/run b/lxc-apps/pandora/image.d/etc/services.d/pandora-encoding/run index b03c3a2..da346b9 100755 --- a/lxc-apps/pandora/image.d/etc/services.d/pandora-encoding/run +++ b/lxc-apps/pandora/image.d/etc/services.d/pandora-encoding/run @@ -2,6 +2,7 @@ cd /srv/pandora/pandora export HOME /srv/pandora +export COLUMNS 80 # Workaround for https://github.com/celery/celery/issues/5761 fdmove -c 2 1 s6-setuidgid pandora /usr/bin/celery -A app worker -Q encoding -n pandora-encoding --maxtasksperchild 500 -l INFO diff --git a/lxc-apps/pandora/image.d/etc/services.d/pandora-tasks/run b/lxc-apps/pandora/image.d/etc/services.d/pandora-tasks/run index ffb3a1a..12ff65e 100755 --- a/lxc-apps/pandora/image.d/etc/services.d/pandora-tasks/run +++ b/lxc-apps/pandora/image.d/etc/services.d/pandora-tasks/run @@ -2,6 +2,7 @@ cd /srv/pandora/pandora export HOME /srv/pandora +export COLUMNS 80 # Workaround for https://github.com/celery/celery/issues/5761 fdmove -c 2 1 s6-setuidgid pandora /usr/bin/celery -A app worker -Q default,celery -n pandora-default --maxtasksperchild 1000 -l INFO diff --git a/lxc-apps/pandora/image.d/etc/services.d/pandora-websocketd/run b/lxc-apps/pandora/image.d/etc/services.d/pandora-websocketd/run new file mode 100755 index 0000000..f0a67ef --- /dev/null +++ b/lxc-apps/pandora/image.d/etc/services.d/pandora-websocketd/run @@ -0,0 +1,7 @@ +#!/bin/execlineb -P + +cd /srv/pandora/pandora +export HOME /srv/pandora +fdmove -c 2 1 +s6-setuidgid pandora +/srv/pandora/pandora/manage.py websocketd diff --git a/lxc-apps/pandora/install/adminpwd.sql b/lxc-apps/pandora/install/adminpwd.sql index 830d3e0..d941322 100644 --- a/lxc-apps/pandora/install/adminpwd.sql +++ b/lxc-apps/pandora/install/adminpwd.sql @@ -1,3 +1,2 @@ -INSERT INTO auth_user (id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined) VALUES (nextval('auth_user_id_seq'), '${PANDORA_ADMIN_HASH}', NULL, true, '${PANDORA_ADMIN_USER}', '', '', '${PANDORA_ADMIN_EMAIL}', true, true, now()); -INSERT INTO user_userprofile (id, reset_code, level, files_updated, newsletter, ui, preferences, notes, user_id) VALUES -(nextval('user_userprofile_id_seq'), NULL, 3, now(), true, '{}', '{}', '', 1); +INSERT INTO system_user (id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined) VALUES (nextval('auth_user_id_seq'), '${PANDORA_ADMIN_HASH}', NULL, true, '${PANDORA_ADMIN_USER}', '', '', '${PANDORA_ADMIN_EMAIL}', true, true, now()); +INSERT INTO user_userprofile (id, reset_code, level, files_updated, newsletter, ui, preferences, notes, user_id) VALUES (nextval('user_userprofile_id_seq'), NULL, 3, now(), true, '{}', '{}', '', 1);