Docker-Thumbor 项目使用教程

随笔2个月前发布 贺源
49 0 0

Docker-Thumbor 项目使用教程

docker-thumborDocker image for thumbor. Detectors, optimizers, lazy detection and separate docker for remotecv.项目地址:https://gitcode.com/gh_mirrors/do/docker-thumbor

1、项目的目录结构及介绍




docker-thumbor/


├── configuration_examples/


│   ├── nginx/


│   ├── remotecv/


│   ├── thumbor-multiprocess-simd/


│   ├── thumbor-multiprocess/


│   ├── thumbor-simd/


│   └── thumbor/


├── .gitignore


├── .travis.env


├── .travis.yml


├── Dockerfile.build


├── LICENSE


├── README.md


├── TODOs


├── builder/


├── docker-compose-test.yml


├── docker-compose-travis.yml


└── thumbor/

configuration_examples/: 包含不同配置示例的目录。thumbor/: 主要项目文件夹,包含 Thumbor 的核心文件。Dockerfile.build: Docker 构建文件。docker-compose-test.ymldocker-compose-travis.yml: Docker Compose 配置文件,用于测试和持续集成。LICENSE: 项目许可证文件。README.md: 项目说明文档。TODOs: 待办事项列表。

2、项目的启动文件介绍

项目的主要启动文件是 docker-compose-test.ymldocker-compose-travis.yml。这两个文件用于启动和管理 Docker 容器,以便进行测试和持续集成。

docker-compose-test.yml




version: '3'


services:


  thumbor:


    image: apsl/thumbor:latest


    ports:


      - "8888:8888"


    environment:


      - THUMBOR_LOG_LEVEL=info


    volumes:


      - ./thumbor/conf:/etc/thumbor/conf

docker-compose-travis.yml




version: '3'


services:


  thumbor:


    image: apsl/thumbor:latest


    ports:


      - "8888:8888"


    environment:


      - THUMBOR_LOG_LEVEL=debug


    volumes:


      - ./thumbor/conf:/etc/thumbor/conf

3、项目的配置文件介绍

项目的配置文件主要位于 thumbor/conf 目录下。以下是一些关键配置文件的介绍:

thumbor.conf




# 日志配置


THUMBOR_LOG_LEVEL = 'info'


 


# 图像处理配置


MAX_WIDTH = 0


MAX_HEIGHT = 0


MIN_WIDTH = 1


MIN_HEIGHT = 1


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'

docker-compose.yml




version: '3'


services:


  thumbor:


    image: apsl/thumbor:latest


    ports:


      - "8888:8888"


    environment:


      - THUMBOR_LOG_LEVEL=info


    volumes:


      - ./thumbor/conf:/etc/thumbor/conf

以上配置文件定义了 Thumbor 服务的日志级别、图像处理参数以及存储配置等。通过修改这些配置文件,可以定制 Thumbor 服务的运行行为。

docker-thumborDocker image for thumbor. Detectors, optimizers, lazy detection and separate docker for remotecv.项目地址:https://gitcode.com/gh_mirrors/do/docker-thumbor

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...