This repository has been archived on 2026-03-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
mars-titiler/docker-compose.yml
2026-02-25 11:38:05 +08:00

51 lines
1.2 KiB
YAML

services:
mars-titiler:
image: ghcr.io/developmentseed/titiler:latest
ports:
- "8001:8000"
# 启动自定义的 Mars Titiler 应用
command: [
"uvicorn",
"app:app",
"--host", "0.0.0.0",
"--port", "8000",
"--reload"
]
working_dir: /mars-titiler
environment:
# Python 模块路径
- PYTHONPATH=/mars-titiler
# GDAL 性能优化配置
- CPL_TMPDIR=/tmp
- GDAL_CACHEMAX=75%
- GDAL_INGESTED_BYTES_AT_OPEN=32768
- GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
- GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES
- GDAL_HTTP_MULTIPLEX=YES
- GDAL_HTTP_VERSION=2
- VSI_CACHE=TRUE
- VSI_CACHE_SIZE=536870912
- PYTHONWARNINGS=ignore
volumes:
# 挂载项目目录到容器
- .:/mars-titiler
# 挂载数据目录
- /home/la/studio/cesium/rio-tiler-tms/data:/data:ro
# 可选:如果使用 gunicorn 生产环境,取消注释以下配置
# command: [
# "gunicorn",
# "-k", "uvicorn.workers.UvicornWorker",
# "app:app",
# "--bind", "0.0.0.0:8000",
# "--workers", "2",
# "--timeout", "120"
# ]
restart: unless-stopped