Skip to content

Commit

Permalink
Merge branch 'main' into #208-index-template
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhealy1 authored Mar 12, 2024
2 parents 3f70857 + 0c7cfcd commit a49e337
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

- use index templates for Collection and Item indices [#208](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/discussions/208)
- Added API `title`, `version`, and `description` parameters from environment variables `STAC_FASTAPI_TITLE`, `STAC_FASTAPI_VERSION` and `STAC_FASTAPI_DESCRIPTION`, respectively. [#207](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/207)

### Changed

Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ services:
context: .
dockerfile: dockerfiles/Dockerfile.dev.es
environment:
- STAC_FASTAPI_TITLE=stac-fastapi-elasticsearch
- STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Elasticsearch backend
- STAC_FASTAPI_VERSION=2.1
- APP_HOST=0.0.0.0
- APP_PORT=8080
- RELOAD=true
Expand Down Expand Up @@ -38,6 +41,9 @@ services:
context: .
dockerfile: dockerfiles/Dockerfile.dev.os
environment:
- STAC_FASTAPI_TITLE=stac-fastapi-opensearch
- STAC_FASTAPI_DESCRIPTION=A STAC FastAPI with an Opensearch backend
- STAC_FASTAPI_VERSION=2.1
- APP_HOST=0.0.0.0
- APP_PORT=8082
- RELOAD=true
Expand Down
4 changes: 3 additions & 1 deletion stac_fastapi/elasticsearch/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Requirements
# stac-fastapi-elasticsearch

## Requirements

The Elasticsearch backend requires **elasticsearch**.
5 changes: 5 additions & 0 deletions stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""FastAPI application."""

import os

from stac_fastapi.api.app import StacApi
from stac_fastapi.api.models import create_get_request_model, create_post_request_model
from stac_fastapi.core.core import (
Expand Down Expand Up @@ -61,6 +63,9 @@
post_request_model = create_post_request_model(extensions)

api = StacApi(
title=os.getenv("STAC_FASTAPI_TITLE", "stac-fastapi-elasticsearch"),
description=os.getenv("STAC_FASTAPI_DESCRIPTION", "stac-fastapi-elasticsearch"),
api_version=os.getenv("STAC_FASTAPI_VERSION", "2.1"),
settings=settings,
extensions=extensions,
client=CoreClient(
Expand Down
6 changes: 5 additions & 1 deletion stac_fastapi/opensearch/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# stac-fastapi-opensearch
# stac-fastapi-opensearch

## Requirements

The Opensearch backend requires **opensearch**.
5 changes: 5 additions & 0 deletions stac_fastapi/opensearch/stac_fastapi/opensearch/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""FastAPI application."""

import os

from stac_fastapi.api.app import StacApi
from stac_fastapi.api.models import create_get_request_model, create_post_request_model
from stac_fastapi.core.core import (
Expand Down Expand Up @@ -61,6 +63,9 @@
post_request_model = create_post_request_model(extensions)

api = StacApi(
title=os.getenv("STAC_FASTAPI_TITLE", "stac-fastapi-opensearch"),
description=os.getenv("STAC_FASTAPI_DESCRIPTION", "stac-fastapi-opensearch"),
api_version=os.getenv("STAC_FASTAPI_VERSION", "2.1"),
settings=settings,
extensions=extensions,
client=CoreClient(
Expand Down

0 comments on commit a49e337

Please sign in to comment.