mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Made image resizing optional again to keep Docker image size down
This commit is contained in:
parent
3714aef878
commit
9ec52806c4
@ -24,7 +24,6 @@ RUN \
|
||||
|
||||
# expected behavior for a default setup is for maloja to "just work"
|
||||
ENV MALOJA_SKIP_SETUP=yes
|
||||
ENV MAGICK_HOME=/usr
|
||||
|
||||
EXPOSE 42010
|
||||
# use exec form for better signal handling https://docs.docker.com/engine/reference/builder/#entrypoint
|
||||
|
1
install/dependencies_basic.txt
Normal file
1
install/dependencies_basic.txt
Normal file
@ -0,0 +1 @@
|
||||
python3
|
@ -1,6 +1,7 @@
|
||||
gcc
|
||||
libxml2-dev
|
||||
libxslt-dev
|
||||
py3-pip
|
||||
libffi-dev
|
||||
libc-dev
|
||||
py3-pip
|
||||
linux-headers
|
||||
|
@ -1,5 +1 @@
|
||||
python3
|
||||
python3-dev
|
||||
imagemagick
|
||||
imagemagick-dev
|
||||
tzdata
|
||||
|
1
install/dependencies_run_opt.txt
Normal file
1
install/dependencies_run_opt.txt
Normal file
@ -0,0 +1 @@
|
||||
vips
|
@ -1,2 +1,4 @@
|
||||
sed 's/#.*//' ./install/dependencies_run.txt | xargs apk add
|
||||
sed 's/#.*//' ./install/dependencies_basic.txt | xargs apk add
|
||||
sed 's/#.*//' ./install/dependencies_build.txt | xargs apk add
|
||||
sed 's/#.*//' ./install/dependencies_run.txt | xargs apk add
|
||||
sed 's/#.*//' ./install/dependencies_run_opt.txt | xargs apk add
|
||||
|
@ -6,7 +6,7 @@ from threading import Thread
|
||||
import setproctitle
|
||||
import pkg_resources
|
||||
from css_html_js_minify import html_minify, css_minify
|
||||
from pyvips import Image
|
||||
|
||||
|
||||
# server stuff
|
||||
from bottle import Bottle, static_file, request, response, FormsDict, redirect, BaseRequest, abort
|
||||
@ -175,6 +175,7 @@ def static_image(pth):
|
||||
response = static_file(small_pth,root=data_dir['images']())
|
||||
else:
|
||||
try:
|
||||
from pyvips import Image
|
||||
thumb = Image.thumbnail(data_dir['images'](pth),300)
|
||||
thumb.webpsave(data_dir['images'](small_pth))
|
||||
response = static_file(small_pth,root=data_dir['images']())
|
||||
|
@ -24,7 +24,7 @@ dependencies = [
|
||||
"doreah>=1.7.2, <2",
|
||||
"nimrodel>=0.7.0",
|
||||
"setproctitle>=1.1.10",
|
||||
"wand>=0.5.4",
|
||||
#"pyvips>=2.1.16",
|
||||
"jinja2>=2.11",
|
||||
"lru-dict>=1.1.6",
|
||||
"css_html_js_minify>=2.5.5",
|
||||
|
@ -3,7 +3,6 @@ waitress>=1.3
|
||||
doreah>=1.7.2
|
||||
nimrodel>=0.7.0
|
||||
setproctitle>=1.1.10
|
||||
wand>=0.5.4
|
||||
jinja2>=2.11
|
||||
lru-dict>=1.1.6
|
||||
css_html_js_minify>=2.5.5
|
||||
|
1
requirements_extra.txt
Normal file
1
requirements_extra.txt
Normal file
@ -0,0 +1 @@
|
||||
pyvips>=2.1
|
Loading…
Reference in New Issue
Block a user