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
Copy file name to clipboardExpand all lines: README.md
+10-35Lines changed: 10 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,22 +15,9 @@ Following implementation requires MongoDB v4.2 or higher.
15
15
## Deployment
16
16
17
17
1. Clone the [https://github.com/EIDA/ws-availability] repository and go to its root
18
-
1. Copy `config.py.sample` to `config.py` and adjust it as needed (please notice there are two sections - `RUNMODE == "production"` and `RUNMODE == "test"`; for Docker deployment use the `production` section):
19
-
20
-
```bash
21
-
# WFCatalog MongoDB
22
-
MONGODB_HOST = "localhost"#MongoDB host
23
-
MONGODB_PORT = 27017 #MongoDB port
24
-
MONGODB_USR = ""#MongoDB user
25
-
MONGODB_PWD = ""#MongoDB password
26
-
MONGODB_NAME = "wfrepo"#MongoDB database name
27
-
FDSNWS_STATION_URL = "https://orfeus-eu.org/fdsnws/station/1/query"#FDSNWS-Station endpoint to harvest restriction information from
28
-
CACHE_HOST = "localhost"#Cache host
29
-
CACHE_PORT = 6379 #Cache port
30
-
CACHE_INVENTORY_KEY = "inventory"#Cache key for restriction information
31
-
CACHE_INVENTORY_PERIOD = 0 #Cache invalidation period for `inventory` key; 0 = never invalidate
32
-
CACHE_RESP_PERIOD = 1200 #Cache invalidation period for API response
33
-
```
18
+
1. Configure the application using Environment Variables. You can use `config.py.sample` as a reference for available variables found in the `Config` class.
19
+
20
+
**Note:** The application now uses a strict typed configuration system. The legacy `config.py` file is no longer loaded directly; parameters must be supplied via environment variables (which fits naturally with the Docker setup below).
34
21
35
22
1. Build the containers:
36
23
@@ -226,23 +213,11 @@ Following implementation requires MongoDB v4.2 or higher.
226
213
## Running in development environment
227
214
228
215
1. Go to the root directory.
229
-
1. Copy `config.py.sample` to `config.py` and adjust it as needed.
230
-
1. Create the virtual environment:
231
-
232
-
```bash
233
-
python3 -m venv env
234
-
```
235
-
236
-
1. Activate the virtual environment:
237
-
238
-
```bash
239
-
source env/bin/activate
240
-
```
241
-
242
-
1. Install the dependencies:
216
+
1. Configure Environment Variables (e.g. by exporting them or creating a `.env` file). Reference `config.py.sample` for names.
217
+
1. Install dependencies using `uv` (faster alternative to pip):
243
218
244
219
```bash
245
-
pip install -r requirements.txt
220
+
uv sync
246
221
```
247
222
248
223
1. Create Redis instance (mandatory for WFCatalog-based deployment):
@@ -254,17 +229,17 @@ Following implementation requires MongoDB v4.2 or higher.
254
229
1. Build the cache:
255
230
256
231
```bash
257
-
python3 cache.py
232
+
uv run python cache.py
258
233
```
259
234
260
235
1. Now you can either:
261
236
1. Run it:
262
237
263
238
```bash
264
-
RUNMODE=test FLASK_APP=start.py flask run
239
+
RUNMODE=test FLASK_APP=start.py uv run flask run --port 9001
0 commit comments