-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0d8fa0
commit 3dd87b8
Showing
4 changed files
with
119 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
version: '3' | ||
|
||
services: | ||
stac: | ||
image: ghcr.io/stac-utils/stac-fastapi-pgstac:latest | ||
ports: | ||
- "${MY_DOCKER_IP:-127.0.0.1}:8081:8081" | ||
environment: | ||
- APP_HOST=0.0.0.0 | ||
- APP_PORT=8081 | ||
- HOST=0.0.0.0 | ||
- PORT=8081 | ||
- ENVIRONMENT=local | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency | ||
- WEB_CONCURRENCY=10 | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core | ||
# - WORKERS_PER_CORE=1 | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers | ||
# - MAX_WORKERS=10 | ||
# Postgres connection | ||
- POSTGRES_USER=username | ||
- POSTGRES_PASS=password | ||
- POSTGRES_DBNAME=postgis | ||
- POSTGRES_HOST_READER=database | ||
- POSTGRES_HOST_WRITER=database | ||
- POSTGRES_PORT=5432 | ||
- DB_MIN_CONN_SIZE=1 | ||
- DB_MAX_CONN_SIZE=10 | ||
depends_on: | ||
- database | ||
command: | ||
bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" | ||
volumes: | ||
- ./dockerfiles/scripts:/tmp/scripts | ||
|
||
raster: | ||
# 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 | ||
image: ghcr.io/stac-utils/titiler-pgstac:latest | ||
ports: | ||
- "${MY_DOCKER_IP:-127.0.0.1}:8082:8082" | ||
environment: | ||
# Application | ||
- HOST=0.0.0.0 | ||
- PORT=8082 | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency | ||
- WEB_CONCURRENCY=1 | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core | ||
- WORKERS_PER_CORE=1 | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers | ||
- MAX_WORKERS=10 | ||
# Postgres connection | ||
- POSTGRES_USER=username | ||
- POSTGRES_PASS=password | ||
- POSTGRES_DBNAME=postgis | ||
- POSTGRES_HOST=database | ||
- POSTGRES_PORT=5432 | ||
- DB_MIN_CONN_SIZE=1 | ||
- DB_MAX_CONN_SIZE=10 | ||
# - DB_MAX_QUERIES=10 | ||
# - DB_MAX_IDLE=10 | ||
# GDAL Config | ||
- 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 | ||
# TiTiler Config | ||
- MOSAIC_CONCURRENCY=1 | ||
# AWS S3 endpoint config | ||
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} | ||
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} | ||
depends_on: | ||
- database | ||
command: | ||
bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" | ||
volumes: | ||
- ./dockerfiles/scripts:/tmp/scripts | ||
|
||
vector: | ||
image: ghcr.io/developementseed/tipg:latest | ||
ports: | ||
- "${MY_DOCKER_IP:-127.0.0.1}:8083:8083" | ||
environment: | ||
# Application | ||
- HOST=0.0.0.0 | ||
- PORT=8083 | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency | ||
- WEB_CONCURRENCY=10 | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core | ||
# - WORKERS_PER_CORE=1 | ||
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers | ||
# - MAX_WORKERS=10 | ||
# Postgres connection | ||
- POSTGRES_USER=username | ||
- POSTGRES_PASS=password | ||
- POSTGRES_DBNAME=postgis | ||
- POSTGRES_HOST=database | ||
- POSTGRES_PORT=5432 | ||
- DB_MIN_CONN_SIZE=1 | ||
- DB_MAX_CONN_SIZE=10 | ||
command: | ||
bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" | ||
depends_on: | ||
- database | ||
volumes: | ||
- ./dockerfiles/scripts:/tmp/scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../infrastructure/DEPLOYMENT.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters