Skip to content

Commit c7b17e6

Browse files
Fix loading of example data in docker compose (#142)
* load docs * updated docs * update change log --------- Co-authored-by: vincentsarago <[email protected]>
1 parent a5a7dda commit c7b17e6

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [Unreleased]
44

5+
- Fix Docker compose file, so example data can be loaded into database (author @zstatmanweil, https://github.com/stac-utils/stac-fastapi-pgstac/pull/142)
6+
57
## [3.0.0] - 2024-08-02
68

79
- Enable filter extension for `GET /items` requests and add `Queryables` links in `/collections` and `/collections/{collection_id}` responses ([#89](https://github.com/stac-utils/stac-fastapi-pgstac/pull/89))

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *b
1616
pre-commit install
1717
```
1818

19+
To run the service on 0.0.0.0:8082 and ingest example data into the database (the "joplin" collection):
20+
21+
```shell
22+
make run-joplin
23+
```
24+
25+
You can connect to the database with a database tool on port 5439 to inspect and see the data.
26+
27+
To run the tests:
28+
29+
```shell
30+
make test
31+
```
32+
1933
## Docs
2034

2135
```bash

docker-compose.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,12 @@ services:
6565
volumes:
6666
- ./stac_fastapi:/app/stac_fastapi
6767
- ./scripts:/app/scripts
68-
command:
69-
- "./scripts/wait-for-it.sh"
70-
- "-t"
71-
- "60"
72-
- "app:8082"
73-
- "--"
74-
- "python"
75-
- "/app/scripts/ingest_joplin.py"
76-
- "http://app:8082"
68+
command: >
69+
/bin/sh -c "
70+
./scripts/wait-for-it.sh -t 60 app:8082 &&
71+
python -m pip install requests &&
72+
python /app/scripts/ingest_joplin.py http://app:8082
73+
"
7774
depends_on:
7875
- database
7976
- app

0 commit comments

Comments
 (0)