|  | 
|  | 1 | +version: '3' | 
|  | 2 | + | 
|  | 3 | +services: | 
|  | 4 | +  stac: | 
|  | 5 | +    image: ghcr.io/stac-utils/stac-fastapi-pgstac:latest | 
|  | 6 | +    ports: | 
|  | 7 | +      - "${MY_DOCKER_IP:-127.0.0.1}:8081:8081" | 
|  | 8 | +    environment: | 
|  | 9 | +      - APP_HOST=0.0.0.0 | 
|  | 10 | +      - APP_PORT=8081 | 
|  | 11 | +      - HOST=0.0.0.0 | 
|  | 12 | +      - PORT=8081 | 
|  | 13 | +      - ENVIRONMENT=local | 
|  | 14 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency | 
|  | 15 | +      - WEB_CONCURRENCY=10 | 
|  | 16 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core | 
|  | 17 | +      # - WORKERS_PER_CORE=1 | 
|  | 18 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers | 
|  | 19 | +      # - MAX_WORKERS=10 | 
|  | 20 | +      # Postgres connection | 
|  | 21 | +      - POSTGRES_USER=username | 
|  | 22 | +      - POSTGRES_PASS=password | 
|  | 23 | +      - POSTGRES_DBNAME=postgis | 
|  | 24 | +      - POSTGRES_HOST_READER=database | 
|  | 25 | +      - POSTGRES_HOST_WRITER=database | 
|  | 26 | +      - POSTGRES_PORT=5432 | 
|  | 27 | +      - DB_MIN_CONN_SIZE=1 | 
|  | 28 | +      - DB_MAX_CONN_SIZE=10 | 
|  | 29 | +    depends_on: | 
|  | 30 | +      - database | 
|  | 31 | +    command: | 
|  | 32 | +      bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" | 
|  | 33 | +    volumes: | 
|  | 34 | +      - ./dockerfiles/scripts:/tmp/scripts | 
|  | 35 | + | 
|  | 36 | +  raster: | 
|  | 37 | +    # At the time of writing, rasterio and psycopg wheels are not available for arm64 arch | 
|  | 38 | +    # so we force the image to be built with linux/amd64 | 
|  | 39 | +    platform: linux/amd64 | 
|  | 40 | +    image: ghcr.io/stac-utils/titiler-pgstac:latest | 
|  | 41 | +    ports: | 
|  | 42 | +      - "${MY_DOCKER_IP:-127.0.0.1}:8082:8082" | 
|  | 43 | +    environment: | 
|  | 44 | +      # Application | 
|  | 45 | +      - HOST=0.0.0.0 | 
|  | 46 | +      - PORT=8082 | 
|  | 47 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency | 
|  | 48 | +      - WEB_CONCURRENCY=1 | 
|  | 49 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core | 
|  | 50 | +      - WORKERS_PER_CORE=1 | 
|  | 51 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers | 
|  | 52 | +      - MAX_WORKERS=10 | 
|  | 53 | +      # Postgres connection | 
|  | 54 | +      - POSTGRES_USER=username | 
|  | 55 | +      - POSTGRES_PASS=password | 
|  | 56 | +      - POSTGRES_DBNAME=postgis | 
|  | 57 | +      - POSTGRES_HOST=database | 
|  | 58 | +      - POSTGRES_PORT=5432 | 
|  | 59 | +      - DB_MIN_CONN_SIZE=1 | 
|  | 60 | +      - DB_MAX_CONN_SIZE=10 | 
|  | 61 | +      # - DB_MAX_QUERIES=10 | 
|  | 62 | +      # - DB_MAX_IDLE=10 | 
|  | 63 | +      # GDAL Config | 
|  | 64 | +      - CPL_TMPDIR=/tmp | 
|  | 65 | +      - GDAL_CACHEMAX=75% | 
|  | 66 | +      - GDAL_INGESTED_BYTES_AT_OPEN=32768 | 
|  | 67 | +      - GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR | 
|  | 68 | +      - GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES | 
|  | 69 | +      - GDAL_HTTP_MULTIPLEX=YES | 
|  | 70 | +      - GDAL_HTTP_VERSION=2 | 
|  | 71 | +      - VSI_CACHE=TRUE | 
|  | 72 | +      - VSI_CACHE_SIZE=536870912 | 
|  | 73 | +      # TiTiler Config | 
|  | 74 | +      - MOSAIC_CONCURRENCY=1 | 
|  | 75 | +      # AWS S3 endpoint config | 
|  | 76 | +      - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} | 
|  | 77 | +      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} | 
|  | 78 | +    depends_on: | 
|  | 79 | +      - database | 
|  | 80 | +    command: | 
|  | 81 | +      bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" | 
|  | 82 | +    volumes: | 
|  | 83 | +      - ./dockerfiles/scripts:/tmp/scripts | 
|  | 84 | + | 
|  | 85 | +  vector: | 
|  | 86 | +    image: ghcr.io/developementseed/tipg:latest | 
|  | 87 | +    ports: | 
|  | 88 | +      - "${MY_DOCKER_IP:-127.0.0.1}:8083:8083" | 
|  | 89 | +    environment: | 
|  | 90 | +      # Application | 
|  | 91 | +      - HOST=0.0.0.0 | 
|  | 92 | +      - PORT=8083 | 
|  | 93 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency | 
|  | 94 | +      - WEB_CONCURRENCY=10 | 
|  | 95 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core | 
|  | 96 | +      # - WORKERS_PER_CORE=1 | 
|  | 97 | +      # https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers | 
|  | 98 | +      # - MAX_WORKERS=10 | 
|  | 99 | +      # Postgres connection | 
|  | 100 | +      - POSTGRES_USER=username | 
|  | 101 | +      - POSTGRES_PASS=password | 
|  | 102 | +      - POSTGRES_DBNAME=postgis | 
|  | 103 | +      - POSTGRES_HOST=database | 
|  | 104 | +      - POSTGRES_PORT=5432 | 
|  | 105 | +      - DB_MIN_CONN_SIZE=1 | 
|  | 106 | +      - DB_MAX_CONN_SIZE=10 | 
|  | 107 | +    command: | 
|  | 108 | +      bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" | 
|  | 109 | +    depends_on: | 
|  | 110 | +      - database | 
|  | 111 | +    volumes: | 
|  | 112 | +      - ./dockerfiles/scripts:/tmp/scripts | 
0 commit comments