You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
53
54
-
### Step 1: Configure the `.env` File
54
+
### Step 1: Configure the `.env` File (Optional)
55
55
56
-
You need to provide a `.env` file to configure the environment variables. Here's a list of variablesyoucan configure:
56
+
If you need to modify the default configuration, provide a `.env` file with your environment variables. Here's a list of configurable variables. If you're comfortable with the defaults, you can run the Docker container without any environment configuration.
57
57
58
58
-`STAC_FASTAPI_TITLE`: Title of the API shown in the documentation (default: `stac-fastapi-elasticsearch` or `stac-fastapi-opensearch`)
59
59
-`STAC_FASTAPI_DESCRIPTION`: Description of the API in the documentation
60
60
-`STAC_FASTAPI_VERSION`: API version (default: `2.1`)
61
61
-`APP_HOST`: Host to bind the server (default: `0.0.0.0`)
62
62
-`APP_PORT`: Port to bind the server (default: `8080`)
63
-
-`RELOAD`: Enable auto-reload for development (default: `true`)
-`BACKEND`: Backend type (`elasticsearch` or `opensearch`)
71
70
-`STAC_FASTAPI_RATE_LIMIT`: API rate limit per client (default: `200/minute`)
72
71
73
72
> [!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.
73
+
> 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
74
76
-
### Step 2: Running the Backend with Elasticsearch
75
+
### Step 2.1: Running the Backend with Elasticsearch
77
76
78
77
To run the backend with Elasticsearch, use the following command:
79
78
80
79
```bash
81
80
docker run -d \
82
-
--env-file .env \
83
81
-p 9200:9200 \
84
82
-p 8080:8080 \
85
83
ghcr.io/stac-utils/stac-fastapi-es:latest
86
84
```
87
85
or
88
86
```bash
89
87
podman run -d \
90
-
--env-file .env \
91
88
-p 9200:9200 \
92
89
-p 8080:8080 \
93
90
ghcr.io/stac-utils/stac-fastapi-es:latest
94
91
```
95
92
96
-
### Step 3: Running the Backend with OpenSearch
93
+
### Step 2.2: Running the Backend with OpenSearch
97
94
98
95
To run the backend with OpenSearch, use the following command:
99
96
100
97
```bash
101
98
docker run -d \
102
-
--env-file .env \
103
99
-p 9202:9202 \
104
100
-p 8080:8080 \
105
101
ghcr.io/stac-utils/stac-fastapi-os:latest
106
102
```
107
103
or
108
104
```bash
109
105
podman run -d \
110
-
--env-file .env \
111
106
-p 9202:9202 \
112
107
-p 8080:8080 \
113
108
ghcr.io/stac-utils/stac-fastapi-os:latest
114
109
```
115
-
### Step 4: Verifying the Backend is Running
110
+
111
+
> [!TIP]
112
+
> If you need to mount a volume, use the [`-v`](https://docs.docker.com/engine/storage/volumes/#choose-the--v-or---mount-flag) flag. To specify an environment file, use the [`--env-file`](https://docs.docker.com/reference/cli/docker/container/run/#env) flag.
113
+
114
+
### Step 3: Verifying the Backend is Running
116
115
117
116
To check if the container is running, use the following command depending on whether you're using Docker or Podman:
0 commit comments