Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:18.04
FROM ubuntu:24.04

LABEL maintainer="Specify Collections Consortium <github.com/specify>"

RUN apt-get update && apt-get -y install --no-install-recommends \
ghostscript \
imagemagick \
python3.6 \
python3-venv \
python3.12 \
python3.12-venv \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN groupadd -g 999 specify && \
Expand All @@ -19,7 +19,7 @@ WORKDIR /home/specify

COPY --chown=specify:specify requirements.txt .

RUN python3.6 -m venv ve && ve/bin/pip install --no-cache-dir -r requirements.txt
RUN python3.12 -m venv ve && ve/bin/pip install --no-cache-dir -r requirements.txt

COPY --chown=specify:specify *.py views ./

Expand All @@ -34,5 +34,4 @@ RUN echo \
"\nDEBUG = os.getenv('DEBUG_MODE', 'false').lower() == 'true'" \
>> settings.py

EXPOSE 8080
CMD ve/bin/python server.py
CMD ["ve/bin/python", "server.py"]
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
asset-server:
restart: unless-stopped
build:
context: ./.
init: true
volumes:
- "attachments:/home/specify/attachments"
- './settings.py:/home/specify/settings.py'
environment:
- SERVER_NAME=localhost
- SERVER_PORT=8080
- ATTACHMENT_KEY=test_attachment_key
- DEBUG_MODE=true
ports:
- "8080:8080"

volumes:
attachments:
10 changes: 6 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
ExifRead==2.3.1
Paste==3.4.4
sh==1.14.0
Bottle>=0.12.23,<0.13
ExifRead==3.5.1
Paste==3.10.1
sh==2.2.2
Bottle>=0.12.23,<=0.13
boto3>=1.26.0,<2.0
boto3-stubs>=1.26.0,<2.0
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def wrapper(*args, **kwargs):
except TokenException as e:
response.content_type = 'text/plain; charset=utf-8'
response.status = 403
return e
return response
return func(*args, **kwargs)

return wrapper
Expand Down