first commit
This commit is contained in:
50
docker-compose.yml
Normal file
50
docker-compose.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
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
|
||||
Reference in New Issue
Block a user