• This repository has been archived on 29/Jul/2022
  • Stars
    star
    292
  • Rank 142,152 (Top 3 %)
  • Language Smarty
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Docker image for thumbor. Detectors, optimizers, lazy detection and separate docker for remotecv.

Minimal Usage

$ docker run -p 8000:8000 apsl/thumbor
$ wget http://localhost:8000/unsafe/300x300/i.imgur.com/bvjzPct.jpg

Docker thumbor and remotecv

Docker Pulls Docker Stars Build Status

Docker image for thumbor, and separated one for remotecv, necessary for the lazy detection.
All parameters of the thumbor config can be set with env vars.
The thumbor's docker expose port 8000 with the service.
Consider to use the docker-thumbor-nginx image to use nginx like a first cache.
The nginx cache check if the file exists in a shared volume (file_storage) after to send the request to thumbor (automated failover).
We propose two thumbor images aspl/thumbor and apsl/thumbor-multiprocess.
The first one (monoprocess) to use under a docker organization tool and the second one use circus to increase the number of thumbor processes. Use multiprocess if you need to deploy in one host and scale up.
The remotecv could be scaled increasing the number of docker images using the same redis queue.

Description

Docker thumbor image

  • All configuration via environment variables
  • Opencv detectors
  • Optimizer JPEG included
  • Nginx cache to optimize the server of result images in a separated docker image
  • Separated remotecv docker image, with AWS S3 loader support.
  • Use the official python images and best practices
  • A lot of docker-compose examples with tipical uses cases
  • envtpl to setup config files on start time, based on environ vars. https://github.com/andreasjansson/envtpl

Ports

  • 8000: thumbor

Docker-compose examples

Check the docker-compose examples:

Env vars and default value:

THUMBOR_LOG_FORMAT='%(asctime)s %(name)s:%(levelname)s %(message)s'
THUMBOR_LOG_DATE_FORMAT='%Y-%m-%d %H:%M:%S'
MAX_WIDTH=0
MAX_HEIGHT=0
MIN_WIDTH=1
MIN_HEIGHT=1
ALLOWED_SOURCES=[]
QUALITY=80
WEBP_QUALITY=None
PNG_COMPRESSION_LEVEL=6
AUTO_WEBP=False
MAX_AGE=86400
MAX_AGE_TEMP_IMAGE=0
RESPECT_ORIENTATION=False
IGNORE_SMART_ERRORS=False
PRESERVE_EXIF_INFO=False
ALLOW_ANIMATED_GIFS=True
USE_GIFSICLE_ENGINE=False
USE_BLACKLIST=False
LOADER='thumbor.loaders.http_loader'
STORAGE='thumbor.storages.file_storage'
AWS_ACCESS_KEY_ID='' -> Note: New in version 5.2.1c
AWS_SECRET_ACCESS_KEY='' -> Note: New in version 5.2.1c
RESULT_STORAGE='thumbor.result_storages.file_storage'
ENGINE='thumbor.engines.pil'
SECURITY_KEY='MY_SECURE_KEY'
ALLOW_UNSAFE_URL=True
ALLOW_OLD_URLS=True
FILE_LOADER_ROOT_PATH='/data/loader'
HTTP_LOADER_CONNECT_TIMEOUT=5
HTTP_LOADER_REQUEST_TIMEOUT=20
HTTP_LOADER_FOLLOW_REDIRECTS=True
HTTP_LOADER_MAX_REDIRECTS=5
HTTP_LOADER_FORWARD_USER_AGENT=False
HTTP_LOADER_DEFAULT_USER_AGENT='Thumbor/5.2.1'
HTTP_LOADER_PROXY_HOST=None
HTTP_LOADER_PROXY_PORT=None
HTTP_LOADER_PROXY_USERNAME=None
HTTP_LOADER_PROXY_PASSWORD=None
HTTP_LOADER_CA_CERTS=None
HTTP_LOADER_VALIDATE_CERTS=True
HTTP_LOADER_CLIENT_KEY=None
HTTP_LOADER_CLIENT_CERT=None
HTTP_LOADER_CURL_ASYNC_HTTP_CLIENT=False
STORAGE_EXPIRATION_SECONDS=2592000
STORES_CRYPTO_KEY_FOR_EACH_IMAGE=False
FILE_STORAGE_ROOT_PATH='/data/storage'
UPLOAD_MAX_SIZE=0
UPLOAD_ENABLED=False
UPLOAD_PHOTO_STORAGE='thumbor.storages.file_storage'
UPLOAD_DELETE_ALLOWED=False
UPLOAD_PUT_ALLOWED=False
UPLOAD_DEFAULT_FILENAME='image'
MONGO_STORAGE_SERVER_HOST='mongo'
MONGO_STORAGE_SERVER_PORT='27017'
MONGO_STORAGE_SERVER_DB='thumbor'
MONGO_STORAGE_SERVER_COLLECTION='images'
REDIS_STORAGE_SERVER_HOST='redis'
REDIS_STORAGE_SERVER_PORT='6379'
REDIS_STORAGE_SERVER_DB=0
REDIS_STORAGE_SERVER_PASSWORD=None
REDIS_RESULT_STORAGE_SERVER_HOST='redis'
REDIS_RESULT_STORAGE_SERVER_PORT=6379
REDIS_RESULT_STORAGE_SERVER_DB=0
REDIS_RESULT_STORAGE_SERVER_PASSWORD=None
MEMCACHE_STORAGE_SERVERS=['localhost:11211',]
MIXED_STORAGE_FILE_STORAGE='thumbor.storages.no_storage'
MIXED_STORAGE_CRYPTO_STORAGE='thumbor.storages.no_storage'
MIXED_STORAGE_DETECTOR_STORAGE='thumbor.storages.no_storage'
META_CALLBACK_NAME=None
DETECTORS=[]
FACE_DETECTOR_CASCADE_FILE='haarcascade_frontalface_alt.xml'
OPTIMIZERS=[]
JPEGTRAN_PATH='/usr/bin/jpegtran'
PROGRESSIVE_JPEG=True
FILTERS=['thumbor.filters.brightness', 'thumbor.filters.contrast', 'thumbor.filters.rgb', 'thumbor.filters.round_corner', 'thumbor.filters.quality', 'thumbor.filters.noise', 'thumbor.filters.watermark', 'thumbor.filters.equalize', 'thumbor.filters.fill', 'thumbor.filters.sharpen', 'thumbor.filters.strip_icc', 'thumbor.filters.frame', 'thumbor.filters.grayscale', 'thumbor.filters.rotate', 'thumbor.filters.format', 'thumbor.filters.max_bytes', 'thumbor.filters.convolution', 'thumbor.filters.blur', 'thumbor.filters.extract_focal', 'thumbor.filters.no_upscale']
RESULT_STORAGE_EXPIRATION_SECONDS=0
RESULT_STORAGE_FILE_STORAGE_ROOT_PATH='/data/result_storage'
RESULT_STORAGE_STORES_UNSAFE=False
REDIS_QUEUE_SERVER_HOST='redis'
REDIS_QUEUE_SERVER_PORT='6379'
REDIS_QUEUE_SERVER_DB='0'
REDIS_QUEUE_SERVER_PASSWORD=None
SQS_QUEUE_KEY_ID=None
SQS_QUEUE_KEY_SECRET=None
SQS_QUEUE_REGION='us-east-1'
USE_CUSTOM_ERROR_HANDLING=False
ERROR_HANDLER_MODULE='thumbor.error_handlers.sentry'
ERROR_FILE_LOGGER=None
ERROR_FILE_NAME_USE_CONTEXT='False'
SENTRY_DSN_URL=''
TC_AWS_REGION='eu-west-1'
TC_AWS_ENDPOINT=None
TC_AWS_STORAGE_BUCKET=''
TC_AWS_STORAGE_ROOT_PATH=''
TC_AWS_LOADER_BUCKET=''
TC_AWS_LOADER_ROOT_PATH=''
TC_AWS_RESULT_STORAGE_BUCKET=''
TC_AWS_RESULT_STORAGE_ROOT_PATH=''
TC_AWS_STORAGE_SSE=False
TC_AWS_STORAGE_RRS=False
TC_AWS_ENABLE_HTTP_LOADER=False
TC_AWS_ALLOWED_BUCKETS=False
TC_AWS_STORE_METADATA=False

More Repositories

1

react-native-keyboard-aware-scroll-view

A ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.
JavaScript
5,279
star
2

react-native-button

A React Native button component customizable via props
JavaScript
746
star
3

puput

A Django blog app implemented in Wagtail
Python
626
star
4

react-native-version-number

Gets the version number and build number of your app.
Java
382
star
5

redux-i18n

A simple and powerful package for translate your react applications using react-redux.
JavaScript
233
star
6

react-native-item-cell

React Native default iOS item cell
JavaScript
72
star
7

react-native-floating-label

A React Native floating label text input for tcomb-form-native
JavaScript
66
star
8

kaneda

Configurable Python library for metrics collection
Python
54
star
9

kubernetes-charts

Helm Charts to deploy Django apps in Kubernetes
Mustache
51
star
10

django-yubin

Send e-mails asyncronously using Celery
Python
49
star
11

go-aws-elb-log-analyzer

Download logs from ELB and join in a sorted file
Go
30
star
12

react-native-navigator-wrapper

A React Native Navigator component wrapper that implements nested navigators for both push and modal transitions
JavaScript
30
star
13

sauron

Sauron is a Django Channels app and Micropython IoT device to monitor toilet status
Python
23
star
14

transmanager

TransManager is a simple django app to deal with the translations tasks of the models content based on django-hvad.
HTML
19
star
15

django-hattori

Command to anonymize sensitive data
Python
18
star
16

pytest-checkipdb

Plugin to check if there are ipdb breakpoints left
Python
18
star
17

django-kaio

Class based settings for Django projects that can be read from multiple sources
Python
17
star
18

rasengan

Rasengan is a command-line tool for automated testing of multiple kind of integrations tests for domains, with a simple and flexible YAML definition syntax.
Python
15
star
19

docker-puput

Docker image for Puput blog
Python
14
star
20

wordpress-to-puput

Import your Wordpress blog data into Puput
Python
13
star
21

react-native-meneame

A meneame.net client for iOS and Android built with React Native
JavaScript
11
star
22

react-native-sumup

Sumup SDK for React Native
Objective-C
11
star
23

react-native-section-menu

A multi-platform React Native sectioned menu
JavaScript
10
star
24

tcomb-form-native-json-schema

A bridge between tcomb-json-schema and tcomb-form-native
JavaScript
10
star
25

react-native-options-button

A bottom animated options button
JavaScript
9
star
26

wagtail-jsonschema-forms

Generate JsonSchema Forms from Wagtail's forms and validate it
Python
8
star
27

docker-django

Django base Dockerfile. Process managed by circus. Config with envtpl.
Shell
7
star
28

puput-demo

An example blog app using Puput
Python
7
star
29

docker-rundeck

Shell
6
star
30

AssetsGenerator

Simple Python script to generate iOS icon image assets
Python
6
star
31

sshail

SSHail is a tool to generate on-demand SSH jails for users using Docker.
Python
6
star
32

docker-circusbase

Docker base image for processes managed with circus. Config parameters with envtpl.
Shell
6
star
33

kumostatus

Create CloudWatch dashboards in mobile html version
Python
6
star
34

docker-tomcat6

Docker container for Legacy Tomcat6 / Java6 app server
Smarty
5
star
35

django-email-foundation

Package for help you to make ease build email templates in your project.
Python
5
star
36

thumbor_talk

CSS
4
star
37

rxp-python

The official Realex Payments Python SDK
4
star
38

django-apslutils

Herramientas y librerรญas varias que utiliza el equipo de APSL para sus proyectos
JavaScript
4
star
39

pycharm-live-templates

Custom live templates
4
star
40

django-behind-lb

Behind-LB is a very simple and efficient Django middleware to obtain the client IP address when the project runs behind a trusted load balancer.
Python
4
star
41

page-size-check

An utility to check the size of your pages and resources used
Python
4
star
42

remotecv_aws

Module to load s3 images in remotecv
Python
3
star
43

apsl.github.io

APSL GitHub page
JavaScript
3
star
44

docker-lamp

Docker APSL base project for LAMP apps
Smarty
3
star
45

docker-bareos-bat

๐Ÿ‹ Dockerized bareos-bat
Dockerfile
3
star
46

docker-devpi

Nginx
3
star
47

django-object-authority

Package to authorize actions (CRUD) to users over concrete items.
Python
3
star
48

pycon-fastapi-example

Python
3
star
49

redux-action-api-utils

Redux actions utility for creating and handling REST API requests
JavaScript
3
star
50

zinnia-to-puput

Import your Zinnia blog data into Puput
Python
2
star
51

docker-postgres

Docker image for postgresql: configure with enviroment variables, postgis and wal-e
Smarty
2
star
52

django-month-filter

Month filter for admin
Python
2
star
53

generator-apsl-angular

This generator extends the default yo generator-angular in order to scaffold angular projects according to APSL dev standards.
JavaScript
2
star
54

docker-tomcat

Docker base container for Tomcat app server
Smarty
2
star
55

docker-wordpress

Wordpress on LAMP managed with circus. Wordpress config parameters managed with envtpl. Keys generated if not found in env.
Smarty
2
star
56

blogger-to-puput

Import your Blogger blog data into Puput
Python
2
star
57

postgresql-wal-e-nagios

Python
2
star
58

docker-tomcat5

Docker container for Legacy Tomcat5 / Java5 app server
Shell
1
star
59

docker-java

Docker base project for java Apps
1
star
60

docker-gcloud

gcloud tool with keys authentication
Shell
1
star
61

deploy_talk

CSS
1
star
62

react-native-scrum-pocket

Scrum Pocket's source code, made with React Native.
JavaScript
1
star
63

webtest

Helper class for selenium tests. Helps running single test, or multi-mechanize tests.
Python
1
star
64

redis-cluster-nagios

Script python to control the status of a master/slave redis cluster.
Python
1
star
65

salt-shellshock

Salt recipe for shellshock (CVE-2014-6271)
Shell
1
star
66

archiclean

Utility for cleaning apache archiva repository versions and snapshots
Python
1
star
67

sepakit

Converts AEB 19.14 Direct Debit TXT file to SEPA XML (Core scheme)
Go
1
star
68

docker-nginx-static

Nginx
1
star
69

ecsh

Cli tool to access Amazon ECS containers with a shell
Python
1
star
70

docker-drupal

Drupal on LAMP managed with circus. Drupal config parameters managed with envtpl. Keys generated if not found in env.
Shell
1
star
71

python-branch

A branch.io client in Python
Python
1
star
72

docker_talk

Docker intro presentation
CSS
1
star
73

ecs-scheduled-task-updater

Simple script to update the task definition of a scheduled task to the latest version
Python
1
star