@@ -5,62 +5,13 @@ services:
5
5
platform : linux/amd64
6
6
build :
7
7
context : .
8
- dockerfile : dockerfiles/Dockerfile.gunicorn
8
+ dockerfile : dockerfiles/Dockerfile
9
9
ports :
10
10
- " 8000:8000"
11
+ command : ["uvicorn", "titiler.application.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
12
+ # Or Using Gunicorn
13
+ # command: ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "titiler.application.main:app", "--bind", "0.0.0.0:8000", "--workers", "1"]
11
14
environment :
12
- # Application
13
- - HOST=0.0.0.0
14
- - PORT=8000
15
- # Gunicorn / Uvicorn
16
- # https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
17
- - WEB_CONCURRENCY=1
18
- # https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core
19
- - WORKERS_PER_CORE=1
20
- # GDAL config
21
- - CPL_TMPDIR=/tmp
22
- - GDAL_CACHEMAX=75%
23
- - GDAL_INGESTED_BYTES_AT_OPEN=32768
24
- - GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
25
- - GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES
26
- - GDAL_HTTP_MULTIPLEX=YES
27
- - GDAL_HTTP_VERSION=2
28
- - PYTHONWARNINGS=ignore
29
- - VSI_CACHE=TRUE
30
- - VSI_CACHE_SIZE=536870912
31
- # GDAL VSI Config
32
- # https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files
33
- # https://gdal.org/user/virtual_file_systems.html#vsigs-google-cloud-storage-files
34
- # https://gdal.org/user/virtual_file_systems.html#vsiaz-microsoft-azure-blob-files
35
- # - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
36
- # - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
37
- # TiTiler config
38
- # - TITILER_API_DISABLE_STAC=TRUE/FALSE
39
- # - TITILER_API_DISABLE_MOSAIC=TRUE/FALSE
40
- # - TITILER_API_DISABLE_COG=TRUE/FALSE
41
- # - TITILER_API_CORS_ORIGIN=url.io,url.xyz
42
- # - TITILER_API_CACHECONTROL=public, max-age=3600
43
- # - TITILER_API_DEBUG=TRUE/FALSE
44
- # - MOSAIC_CONCURRENCY= # will default to `RIO_TILER_MAX_THREADS`
45
- # rio-tiler config
46
- # - RIO_TILER_MAX_THREADS=
47
-
48
- titiler-uvicorn :
49
- # TODO: remove once https://github.com/rasterio/rasterio-wheels/issues/69 is resolved
50
- # See https://github.com/developmentseed/titiler/discussions/387
51
- platform : linux/amd64
52
- build :
53
- context : .
54
- dockerfile : dockerfiles/Dockerfile.uvicorn
55
- ports :
56
- - " 8000:8000"
57
- environment :
58
- # Application
59
- - HOST=0.0.0.0
60
- - PORT=8000
61
- # Uvicorn
62
- # http://www.uvicorn.org/settings/#production
63
- - WEB_CONCURRENCY=1
64
15
# GDAL config
65
16
- CPL_TMPDIR=/tmp
66
17
- GDAL_CACHEMAX=75%
@@ -91,7 +42,7 @@ services:
91
42
92
43
benchmark :
93
44
extends :
94
- service : titiler-uvicorn
45
+ service : titiler
95
46
volumes :
96
47
- ./.github/data:/data
97
48
0 commit comments