Skip to content

Commit

Permalink
Fix loading of example data in docker compose (#142)
Browse files Browse the repository at this point in the history
* load docs

* updated docs

* update change log

---------

Co-authored-by: vincentsarago <[email protected]>
  • Loading branch information
zstatmanweil and vincentsarago committed Aug 21, 2024
1 parent a5a7dda commit c7b17e6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [Unreleased]

- Fix Docker compose file, so example data can be loaded into database (author @zstatmanweil, https://github.com/stac-utils/stac-fastapi-pgstac/pull/142)

## [3.0.0] - 2024-08-02

- 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))
Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *b
pre-commit install
```

To run the service on 0.0.0.0:8082 and ingest example data into the database (the "joplin" collection):

```shell
make run-joplin
```

You can connect to the database with a database tool on port 5439 to inspect and see the data.

To run the tests:

```shell
make test
```

## Docs

```bash
Expand Down
15 changes: 6 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ services:
volumes:
- ./stac_fastapi:/app/stac_fastapi
- ./scripts:/app/scripts
command:
- "./scripts/wait-for-it.sh"
- "-t"
- "60"
- "app:8082"
- "--"
- "python"
- "/app/scripts/ingest_joplin.py"
- "http://app:8082"
command: >
/bin/sh -c "
./scripts/wait-for-it.sh -t 60 app:8082 &&
python -m pip install requests &&
python /app/scripts/ingest_joplin.py http://app:8082
"
depends_on:
- database
- app
Expand Down

0 comments on commit c7b17e6

Please sign in to comment.