Skip to content

Commit 710b8f4

Browse files
committed
furnished readme and changelog
1 parent b24192e commit 710b8f4

File tree

2 files changed

+82
-19
lines changed

2 files changed

+82
-19
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
## [v3.2.1] - 2024-11-14
1111

1212
### Added
13+
- Added `dockerfiles/Dockerfile.ci.os` and `dockerfiles/Dockerfile.ci.es`, along with their respective entrypoints [#311](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/311)
1314

14-
- Added Docker image publishing to GitHub Container Registry in publish.yml [#311](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/311)
15+
### Changed
16+
- Updated the `publish.yml` workflow to include Docker image publishing to GitHub Container Registry [#311](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/311)
17+
- Improved the README with detailed descriptions of the new Docker images, providing guidance for images. [#311](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/311)
1518

1619
## [v3.2.0] - 2024-10-09
1720

README.md

Lines changed: 78 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,38 +33,98 @@
3333
- We are always welcoming contributions. For the development notes: [Contributing](CONTRIBUTING.md)
3434

3535

36-
### To install from PyPI:
36+
### Installing STAC-FastAPI from PyPI
3737

38-
```shell
38+
To install STAC-FastAPI with Elasticsearch or OpenSearch backend support, run the following command:
39+
40+
For Elasticsearch:
41+
```bash
3942
pip install stac_fastapi.elasticsearch
4043
```
41-
or
42-
```
44+
45+
For OpenSearch:
46+
```bash
4347
pip install stac_fastapi.opensearch
4448
```
4549

46-
## Build Elasticsearch API backend
50+
## Running STAC-FastAPI Elasticsearch or OpenSearch API on `localhost:8080`
4751

48-
```shell
49-
docker-compose up elasticsearch
50-
docker-compose build app-elasticsearch
52+
Before starting, [Docker](https://docs.docker.com/get-started/) or [Podman](https://podman.io/docs) has to be installed and running on your machine.
53+
54+
### Step 1: Configure the `.env` File
55+
56+
You need to provide a `.env` file to configure the environment variables. Here's a list of variables you can configure:
57+
58+
- `STAC_FASTAPI_TITLE`: Title of the API shown in the documentation (default: `stac-fastapi-elasticsearch` or `stac-fastapi-opensearch`)
59+
- `STAC_FASTAPI_DESCRIPTION`: Description of the API in the documentation
60+
- `STAC_FASTAPI_VERSION`: API version (default: `2.1`)
61+
- `APP_HOST`: Host to bind the server (default: `0.0.0.0`)
62+
- `APP_PORT`: Port to bind the server (default: `8080`)
63+
- `RELOAD`: Enable auto-reload for development (default: `true`)
64+
- `ENVIRONMENT`: Runtime environment (default: `local`)
65+
- `WEB_CONCURRENCY`: Number of worker processes (default: `10`)
66+
- `ES_HOST`: Elasticsearch or OpenSearch host (default: `localhost`)
67+
- `ES_PORT`: Elasticsearch port (default: `9200` for Elasticsearch, `9202` for OpenSearch)
68+
- `ES_USE_SSL`: Enable SSL for Elasticsearch (default: `false`)
69+
- `ES_VERIFY_CERTS`: Verify SSL certificates (default: `false`)
70+
- `BACKEND`: Backend type (`elasticsearch` or `opensearch`)
71+
- `STAC_FASTAPI_RATE_LIMIT`: API rate limit per client (default: `200/minute`)
72+
73+
> [!NOTE]
74+
> The variables `ES_HOST`, `ES_PORT`, `ES_USE_SSL`, and `ES_VERIFY_CERTS` apply to both Elasticsearch and OpenSearch, so there is no need to rename the key names to `OS_` even if you're using OpenSearch.
75+
76+
### Step 2: Running the Backend with Elasticsearch
77+
78+
To run the backend with Elasticsearch, use the following command:
79+
80+
```bash
81+
docker run -d \
82+
--env-file .env \
83+
-p 9200:9200 \
84+
-p 8080:8080 \
85+
ghcr.io/stac-utils/stac-fastapi-es:latest
86+
```
87+
or
88+
```bash
89+
podman run -d \
90+
--env-file .env \
91+
-p 9200:9200 \
92+
-p 8080:8080 \
93+
ghcr.io/stac-utils/stac-fastapi-es:latest
5194
```
5295

53-
## Running Elasticsearch API on localhost:8080
96+
### Step 3: Running the Backend with OpenSearch
5497

55-
```shell
56-
docker-compose up app-elasticsearch
98+
To run the backend with OpenSearch, use the following command:
99+
100+
```bash
101+
docker run -d \
102+
--env-file .env \
103+
-p 9202:9202 \
104+
-p 8080:8080 \
105+
ghcr.io/stac-utils/stac-fastapi-os:latest
57106
```
107+
or
108+
```bash
109+
podman run -d \
110+
--env-file .env \
111+
-p 9202:9202 \
112+
-p 8080:8080 \
113+
ghcr.io/stac-utils/stac-fastapi-os:latest
114+
```
115+
### Step 4: Verifying the Backend is Running
58116

59-
By default, docker-compose uses Elasticsearch 8.x and OpenSearch 2.11.1.
60-
If you wish to use a different version, put the following in a
61-
file named `.env` in the same directory you run docker-compose from:
117+
To check if the container is running, use the following command depending on whether you're using Docker or Podman:
62118

63-
```shell
64-
ELASTICSEARCH_VERSION=7.17.1
65-
OPENSEARCH_VERSION=2.11.0
119+
```bash
120+
docker ps
66121
```
67-
The most recent Elasticsearch 7.x versions should also work. See the [opensearch-py docs](https://github.com/opensearch-project/opensearch-py/blob/main/COMPATIBILITY.md) for compatibility information.
122+
or
123+
```bash
124+
podman ps
125+
```
126+
127+
## Interacting with the API
68128

69129
To create a new Collection:
70130

0 commit comments

Comments
 (0)