Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
version: '3'
services:
thumbor:
image: minimalcompact/thumbor
environment:
# VIRTUAL_HOST is picked up by nginx-proxy. Here it's set for localhost
# but you usually need to point it to your domain, e.g. thumbor.example.com
- VIRTUAL_HOST=localhost
# THUMBOR_NUM_PROCESSES control how many processes run inside the container
# Normally this is set in connection with the number of CPU cores
# Note however that you can also use the docker-compose scale option to dynamically
# scale your thumbor instances
- THUMBOR_NUM_PROCESSES=4
# this would allow CORS from any origin (you can restrict to specific origins if you want)
- CORS_ALLOW_ORIGIN=*
# returns a webp image if browser Accept headers match
- AUTO_WEBP=True
# nginx-proxy does caching automatically, so no need to store the result storage cache
# (this greatly speeds up and saves on CPU)
- RESULT_STORAGE=thumbor.result_storages.no_storage
- RESULT_STORAGE_STORES_UNSAFE=True
# setting mixed storage, and detector storage using redis
- STORAGE=thumbor.storages.mixed_storage
- MIXED_STORAGE_DETECTOR_STORAGE=tc_redis.storages.redis_storage
# using queued_complete_detector which uses all available detectors
- DETECTORS=['thumbor.detectors.queued_detector.queued_complete_detector']
# redis settings for storage and queue
- REDIS_STORAGE_SERVER_HOST=redis
- REDIS_STORAGE_SERVER_PORT=6379
- REDIS_STORAGE_SERVER_DB=0
- REDIS_QUEUE_SERVER_HOST=redis
- REDIS_QUEUE_SERVER_PORT=6379
- REDIS_QUEUE_SERVER_DB=0
links:
- redis:redis
restart: always
networks:
- app
nginx-proxy:
image: minimalcompact/thumbor-nginx-proxy-cache
environment:
# setting the DEFAULT_HOST to the same as the VIRTUAL_HOST above.
# Makes sure it works irrespective of the host name
# Normally this won't be necessary, but it helps for testing.
- DEFAULT_HOST=localhost
# optional: control cache memory size (default 500m), cache size (default 10g) and inactive (default 300m)
# see https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path
- PROXY_CACHE_SIZE=10g
- PROXY_CACHE_MEMORY_SIZE=500m
- PROXY_CACHE_INACTIVE=300m
volumes:
# this is essential for nginx-proxy to detect docker containers, scaling etc
# see https://github.com/jwilder/nginx-proxy
- /var/run/docker.sock:/tmp/docker.sock:ro
# mapping cache folder, to persist it independently of the container
- ./cache:/var/cache/nginx
ports:
- "80:80"
- "443:443"
restart: always
networks:
- app
remotecv:
image: minimalcompact/remotecv
environment:
# same settings as for thumbor, above
- REMOTECV_REDIS_HOST=redis
- REMOTECV_REDIS_PORT=6379
- REMOTECV_REDIS_DATABASE=0
# - REMOTECV_LOADER=remotecv_aws.loader
- REMOTECV_LOADER=remotecv.http_loader
deploy:
replicas: 1
links:
- redis:redis
restart: always
networks:
- app
redis:
image: redis:latest
deploy:
replicas: 1
restart: always
networks:
- app
volumes:
cache:
driver: local
networks:
app:
driver: bridge