Bump Pandora to Alpine 3.11 + Python 3.8

This commit is contained in:
Disassembler 2020-06-21 18:04:06 +02:00
parent ebe3828b5e
commit 3839eddb60
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
9 changed files with 26 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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