diff --git a/.ansible/roles/web/templates/nginx.j2 b/.ansible/roles/web/templates/nginx.j2 index 36c8630..66da14e 100644 --- a/.ansible/roles/web/templates/nginx.j2 +++ b/.ansible/roles/web/templates/nginx.j2 @@ -4,21 +4,28 @@ upstream {{ project_name }} { server { listen 80 default_server; + listen [::]:80 default_server; server_name {{ web_domain }} {{ web_domain_alias }}; return 301 https://{{ web_domain }}$request_uri; } server { - listen 443 ssl; + listen 443 http2 ssl; + listen [::]:443 http2 ssl; + server_name {{ web_domain_alias }}; + ssl_certificate {{ certbot_key_dir }}/fullchain.pem; ssl_certificate_key {{ certbot_key_dir }}/privkey.pem; - server_name {{ web_domain_alias }}; + include {{ certbot_conf_dir }}/options-ssl-nginx.conf; + ssl_dhparam {{ certbot_conf_dir }}/ssl-dhparams.pem; + return 301 https://{{ web_domain }}$request_uri; } server { - listen 443 ssl default_server; + listen 443 http2 ssl default_server; + listen [::]:443 http2 ssl default_server; server_name {{ web_domain }}; ssl_certificate {{ certbot_key_dir }}/fullchain.pem; diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 45386d1..34fe659 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -21,6 +21,7 @@ ENV APP_ENV=${APP_ENV} \ RUN apt-get update \ && apt-get --no-install-recommends -y install \ bash-completion \ + ftp \ libexempi8 \ libmemcached-dev \ postgresql-client \ diff --git a/creator/tasks/id3.py b/creator/tasks/id3.py index f3ea8d8..93e4d88 100644 --- a/creator/tasks/id3.py +++ b/creator/tasks/id3.py @@ -1,9 +1,9 @@ import celery -from django import utils as django_utils from django import urls +from django import utils as django_utils -from frontrowcrew.utils import sites from creator import models +from frontrowcrew.utils import sites @celery.shared_task @@ -55,9 +55,9 @@ def apply_id3_tags( album_image = None album_image_data = episode.image if album_image_data: - album_image = album_image_data.open("rb") + album_image = album_image_data.file elif podcast.image: - album_image = podcast.image.open("rb") + album_image = podcast.image.file id3_data["album_image"] = album_image @@ -80,7 +80,4 @@ def apply_id3_tags( mp3.set_id3(**id3_data) - if album_image: - album_image.close() - return mp3.id diff --git a/creator/templates/creator/base.html b/creator/templates/creator/base.html index 42f4e52..10fe6d8 100644 --- a/creator/templates/creator/base.html +++ b/creator/templates/creator/base.html @@ -22,7 +22,7 @@ {% block nav%}