Closed jamesfisher-geo closed 6 months ago
I think the ENV variable names/ meanings may have changed, it's still nice to have our own defaults. We should probably include all of these. Once v2.5.0 is released we can update and make sure everything works. What do you think? I may be missing something here.
- `STAC_FASTAPI_VERSION` (string) is the version number of your API instance (this is not the STAC version).
- `STAC FASTAPI_TITLE` (string) should be a self-explanatory title for your API.
- `STAC FASTAPI_DESCRIPTION` (string) should be a good description for your API. It can contain CommonMark.
- `STAC_FASTAPI_LANDING_ID` (string) is a unique identifier for your Landing page.```
Sounds great. Would the defaults be defined when instantiating StacApi
like below? Or will they be defined in a separate app config file?
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(
database=database_logic, session=session, post_request_model=post_request_model
),
search_get_request_model=create_get_request_model(extensions),
search_post_request_model=post_request_model,
)
we could add something like this to the config file and then import them if we want: https://github.com/stac-utils/stac-fastapi/blob/f7d2eb3c30bef338e3bf6cce5c425b531a653a5e/stac_fastapi/types/stac_fastapi/types/config.py#L7-L42
Related Issue(s):
206
Description: Adds API
title
anddescription
parameters from environment variablesSTAC_API_TITLE
andSTAC_API_DESCRIPTION
, respectively.PR Checklist:
pre-commit run --all-files
)make test
)