|
| 1 | +version: '3.9' |
| 2 | + |
| 3 | +services: |
| 4 | + app-elasticsearch: |
| 5 | + container_name: stac-fastapi-es |
| 6 | + image: stac-utils/stac-fastapi-es |
| 7 | + restart: always |
| 8 | + build: |
| 9 | + context: . |
| 10 | + dockerfile: dockerfiles/Dockerfile.dev.es |
| 11 | + environment: |
| 12 | + - STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch |
| 13 | + - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend |
| 14 | + - STAC_FASTAPI_VERSION=2.1 |
| 15 | + - APP_HOST=0.0.0.0 |
| 16 | + - APP_PORT=8080 |
| 17 | + - RELOAD=true |
| 18 | + - ENVIRONMENT=local |
| 19 | + - WEB_CONCURRENCY=10 |
| 20 | + - ES_HOST=elasticsearch |
| 21 | + - ES_PORT=9200 |
| 22 | + - ES_USE_SSL=false |
| 23 | + - ES_VERIFY_CERTS=false |
| 24 | + - BACKEND=elasticsearch |
| 25 | + - STAC_FASTAPI_RATE_LIMIT=500/minute |
| 26 | + ports: |
| 27 | + - "8080:8080" |
| 28 | + volumes: |
| 29 | + - ./stac_fastapi:/app/stac_fastapi |
| 30 | + - ./scripts:/app/scripts |
| 31 | + - ./esdata:/usr/share/elasticsearch/data |
| 32 | + depends_on: |
| 33 | + - elasticsearch |
| 34 | + command: |
| 35 | + bash -c "./scripts/wait-for-it-es.sh es-container:9200 && python -m stac_fastapi.elasticsearch.app" |
| 36 | + |
| 37 | + app-opensearch: |
| 38 | + container_name: stac-fastapi-os |
| 39 | + image: stac-utils/stac-fastapi-os |
| 40 | + restart: always |
| 41 | + build: |
| 42 | + context: . |
| 43 | + dockerfile: dockerfiles/Dockerfile.dev.os |
| 44 | + environment: |
| 45 | + - STAC_FASTAPI_TITLE=stac-fastapi-opensearch |
| 46 | + - STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Opensearch backend |
| 47 | + - STAC_FASTAPI_VERSION=3.0.0a2 |
| 48 | + - APP_HOST=0.0.0.0 |
| 49 | + - APP_PORT=8082 |
| 50 | + - RELOAD=true |
| 51 | + - ENVIRONMENT=local |
| 52 | + - WEB_CONCURRENCY=10 |
| 53 | + - ES_HOST=opensearch |
| 54 | + - ES_PORT=9202 |
| 55 | + - ES_USE_SSL=false |
| 56 | + - ES_VERIFY_CERTS=false |
| 57 | + - BACKEND=opensearch |
| 58 | + - STAC_FASTAPI_RATE_LIMIT=200/minute |
| 59 | + ports: |
| 60 | + - "8082:8082" |
| 61 | + volumes: |
| 62 | + - ./stac_fastapi:/app/stac_fastapi |
| 63 | + - ./scripts:/app/scripts |
| 64 | + - ./osdata:/usr/share/opensearch/data |
| 65 | + depends_on: |
| 66 | + - opensearch |
| 67 | + command: |
| 68 | + bash -c "./scripts/wait-for-it-es.sh os-container:9202 && python -m stac_fastapi.opensearch.app" |
| 69 | + |
| 70 | + elasticsearch: |
| 71 | + container_name: es-container |
| 72 | + image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-8.11.0} |
| 73 | + hostname: elasticsearch |
| 74 | + environment: |
| 75 | + ES_JAVA_OPTS: -Xms512m -Xmx1g |
| 76 | + volumes: |
| 77 | + - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml |
| 78 | + - ./elasticsearch/snapshots:/usr/share/elasticsearch/snapshots |
| 79 | + ports: |
| 80 | + - "9200:9200" |
| 81 | + |
| 82 | + opensearch: |
| 83 | + container_name: os-container |
| 84 | + image: opensearchproject/opensearch:${OPENSEARCH_VERSION:-2.11.1} |
| 85 | + hostname: opensearch |
| 86 | + environment: |
| 87 | + - discovery.type=single-node |
| 88 | + - plugins.security.disabled=true |
| 89 | + - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m |
| 90 | + volumes: |
| 91 | + - ./opensearch/config/opensearch.yml:/usr/share/opensearch/config/opensearch.yml |
| 92 | + - ./opensearch/snapshots:/usr/share/opensearch/snapshots |
| 93 | + ports: |
| 94 | + - "9202:9202" |
0 commit comments