Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loading of example data in docker compose #142

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading