-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathdocker-compose.yml
80 lines (77 loc) · 2.92 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
services:
tiler:
container_name: tiler-pgstac
# At the time of writing, rasterio and psycopg wheels are not available for arm64 arch
# so we force the image to be built with linux/amd64
platform: linux/amd64
build:
context: .
dockerfile: Dockerfile
ports:
- "8081:8081"
command: ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "titiler.pgstac.main:app", "--bind", "0.0.0.0:8081", "--workers", "1"]
environment:
# Postgres connection
- POSTGRES_USER=username
- POSTGRES_PASS=password
- POSTGRES_DBNAME=postgis
- POSTGRES_HOST=database
- POSTGRES_PORT=5432
# PG connection
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=1
# - DB_MAX_QUERIES=10
# - DB_MAX_IDLE=10
# GDAL Config
# This option controls the default GDAL raster block cache size.
# If its value is small (less than 100000), it is assumed to be measured in megabytes, otherwise in bytes.
- GDAL_CACHEMAX=200
- GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
- GDAL_INGESTED_BYTES_AT_OPEN=32768
- GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES
- GDAL_HTTP_MULTIPLEX=YES
- GDAL_HTTP_VERSION=2
# The file can be cached in RAM by setting the configuration option VSI_CACHE to TRUE.
# The cache size defaults to 25 MB, but can be modified by setting the configuration option VSI_CACHE_SIZE (in bytes).
# Content in that cache is discarded when the file handle is closed.
- VSI_CACHE=TRUE
- VSI_CACHE_SIZE=536870912
# In addition, a global least-recently-used cache of 16 MB shared among all downloaded content is enabled by default,
# and content in it may be reused after a file handle has been closed and reopen,
# during the life-time of the process or until VSICurlClearCache() is called.
# Starting with GDAL 2.3, the size of this global LRU cache can be modified by
# setting the configuration option CPL_VSIL_CURL_CACHE_SIZE (in bytes).
- CPL_VSIL_CURL_CACHE_SIZE=200000000
# TiTiler Config
- MOSAIC_CONCURRENCY=5
# AWS S3 endpoint config
# - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
# - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
volumes:
- ./benchmark:/tmp/benchmark
depends_on:
- database
tiler-uvicorn:
container_name: tiler-pgstac-uvicorn
extends:
service: tiler
ports:
- "8083:8083"
command: ["uvicorn", "titiler.pgstac.main:app", "--host", "0.0.0.0", "--port", "8083", "--workers", "1"]
database:
container_name: stac-db
image: ghcr.io/stac-utils/pgstac:v${PGSTAC_VERSION-0.9.2}
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgis
- PGUSER=username
- PGDATABASE=postgis
ports:
- "5439:5432"
command: postgres -N 500
volumes:
- ./.pgdata:/var/lib/postgresql/data
networks:
default:
name: stac-fastapi-network