Skip to content

Commit 49cbc51

Browse files
committed
bumps python version in huey dockerfile; removes unused PyNaCl dependency; Better handling of content types on StoryMap imports
1 parent 677474a commit 49cbc51

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
localstack-data/
2+
13
dist/*
24
.pgdata/
35

Dockerfile.huey

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8.2
1+
FROM python:3.10.2
22
ENV PYTHONUNBUFFERED=1
33
COPY ./requirements-dev.txt /usr/src/apps/StoryMapJS/
44
#COPY ./.localstack/KnightLabRootCA.crt /usr/src/apps/StoryMapJS/

docker-compose.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
version: '3.9'
2-
3-
4-
volumes:
5-
localstack-data:
6-
external: true
7-
8-
91
services:
102

113
app:
@@ -48,7 +40,7 @@ services:
4840
# - LOCALSTACK_DATA_DIR=/localstack/data
4941
volumes:
5042
#- ./.localstack/:/var/lib/localstack
51-
- localstack-data:/var/lib/localstack
43+
- ./localstack-data:/var/lib/localstack
5244
#- ./.localstack/:/localstack
5345
#- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
5446

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ psycopg2-binary==2.8.5
3232
pyasn1==0.4.8
3333
pyasn1-modules==0.2.8
3434
pycparser==2.14
35-
PyNaCl==1.3.0
3635
pyOpenSSL==20.0.1
3736
python-slugify==1.1.2
3837
requests==2.24.0

storymap/storage.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Object Keys
55
http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
66
"""
7+
import mimetypes
78
import os
89
import sys
910
import time
@@ -197,6 +198,11 @@ def save_from_data(key_name, content_type, content):
197198
"""
198199
Save content with content-type to key_name
199200
"""
201+
if content_type is None:
202+
content_type, _ = mimetypes.guess_type(key_name)
203+
if content_type is None:
204+
content_type = 'application/octet-stream'
205+
200206
_conn.put_object(
201207
ACL='public-read',
202208
Body=content,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy