Skip to content

Commit 4826f19

Browse files
committed
reflect comment on first method of installation of readme
1 parent 15b0d65 commit 4826f19

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

README.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,53 @@
4040

4141
- [**Docker Compose**](https://docs.docker.com/compose/install/) or [**Podman Compose**](https://podman-desktop.io/docs/compose) installed and running on your machine. In all the follwoing steps instead of `docker-compose` you can use `podman-compose` as well.
4242

43-
#### **Step 1: Install STAC-FastAPI**
43+
This approach is for users who want to install the Python package separately before running the app.
4444

45-
To install STAC-FastAPI with Elasticsearch or OpenSearch backend support, execute the following commands:
45+
##### **Step 1: Install STAC-FastAPI**
4646

4747
- **For Elasticsearch backend:**
48-
48+
4949
```bash
5050
pip install stac_fastapi.elasticsearch
5151
```
5252

5353
- **For OpenSearch backend:**
54-
54+
5555
```bash
5656
pip install stac_fastapi.opensearch
5757
```
5858

59-
#### **Step 2: Build the Elasticsearch API Backend**
59+
##### **Step 2: Start Elasticsearch/OpenSearch Backend**
6060

61-
Start the Elasticsearch service and build the STAC-FastAPI application image:
61+
Launch Elasticsearch using Docker Compose:
6262

6363
```bash
64+
# For ElasticSearch
6465
docker-compose up -d elasticsearch
65-
docker-compose build app-elasticsearch
66+
# For OpenSearch
67+
docker-compose up -d opensearch
6668
```
6769

68-
#### **Step 3: Run the Elasticsearch API on `localhost:8080`**
70+
##### **Step 3: Run the Application**
71+
72+
With Elasticsearch running, you can now run the application:
73+
74+
```bash
75+
uvicorn stac_fastapi.elasticsearch.app:app \
76+
--host localhost \
77+
--port 8080 \
78+
--workers 10 \
79+
--reload
80+
```
6981

70-
Launch the STAC-FastAPI application connected to Elasticsearch:
82+
and with OpenSearch running:
7183

7284
```bash
73-
docker-compose up -d app-elasticsearch
85+
uvicorn stac_fastapi.opensearch.app:app \
86+
--host localhost \
87+
--port 8080 \
88+
--workers 10 \
89+
--reload
7490
```
7591

7692
By default, Docker Compose uses Elasticsearch 8.x and OpenSearch 2.11.1. If you prefer to use different versions, create a file named `.env` in the same directory where you run Docker Compose and include the following lines:

0 commit comments

Comments
 (0)