Skip to content

Commit b5d59a6

Browse files
author
Phil Varner
authored
Merge pull request #20 from stac-utils/pv/remove-mongo
remove mongodb related code
2 parents 8e26477 + 319b16c commit b5d59a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+24
-3855
lines changed

.github/workflows/cicd.yaml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ jobs:
1111
timeout-minutes: 10
1212

1313
services:
14-
mongo_db_service:
15-
image: mongo:3.6
16-
env:
17-
MONGO_INITDB_ROOT_USERNAME: dev
18-
MONGO_INITDB_ROOT_PASSWORD: stac
19-
ports:
20-
- 27018:27017
2114

2215
elasticsearch_db_service:
2316
image: docker.elastic.co/elasticsearch/elasticsearch:7.14.2
@@ -48,23 +41,9 @@ jobs:
4841
run: |
4942
python -m pip install --upgrade pipenv wheel
5043
51-
- name: Install mongo stac-fastapi
52-
run: |
53-
pip install ./stac_fastapi/mongo[dev,server]
54-
5544
- name: Install elasticsearch stac-fastapi
5645
run: |
5746
pip install ./stac_fastapi/elasticsearch[dev,server]
58-
59-
- name: Run test suite
60-
run: |
61-
cd stac_fastapi/mongo && pipenv run pytest -svvv
62-
env:
63-
ENVIRONMENT: testing
64-
MONGO_USER: dev
65-
MONGO_PASS: stac
66-
MONGO_PORT: 27018
67-
MONGO_HOST: localhost
6847
6948
- name: Run test suite
7049
run: |

.github/workflows/publish-to-pypi.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/publish-to-test-pypi.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ dmypy.json
128128
# Pyre type checker
129129
.pyre/
130130

131-
# mongo db data
132-
/mongo_data
133-
134131
/esdata
135132

136133
# Virtualenv
File renamed without changes.

Dockerfile.mongo

Lines changed: 0 additions & 20 deletions
This file was deleted.

Makefile

Lines changed: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,36 @@ APP_HOST ?= 0.0.0.0
33
APP_PORT ?= 8080
44
EXTERNAL_APP_PORT ?= ${APP_PORT}
55

6-
run_es = docker-compose -f docker-compose.elasticsearch.yml \
7-
run \
8-
-p ${EXTERNAL_APP_PORT}:${APP_PORT} \
9-
-e PY_IGNORE_IMPORTMISMATCH=1 \
10-
-e APP_HOST=${APP_HOST} \
11-
-e APP_PORT=${APP_PORT} \
12-
app-elasticsearch
13-
14-
run_mongo = docker-compose -f docker-compose.mongo.yml \
15-
run \
16-
-p ${EXTERNAL_APP_PORT}:${APP_PORT} \
17-
-e PY_IGNORE_IMPORTMISMATCH=1 \
18-
-e APP_HOST=${APP_HOST} \
19-
-e APP_PORT=${APP_PORT} \
20-
app-mongo
6+
run_es = docker-compose \
7+
run \
8+
-p ${EXTERNAL_APP_PORT}:${APP_PORT} \
9+
-e PY_IGNORE_IMPORTMISMATCH=1 \
10+
-e APP_HOST=${APP_HOST} \
11+
-e APP_PORT=${APP_PORT} \
12+
app-elasticsearch
2113

2214
.PHONY: es-image
2315
es-image:
24-
docker-compose -f docker-compose.elasticsearch.yml build
25-
26-
.PHONY: mongo-image
27-
mongo-image:
28-
docker-compose -f docker-compose.mongo.yml build
16+
docker-compose build
2917

3018
.PHONY: docker-run-es
3119
docker-run-es: es-image
3220
$(run_es)
3321

34-
.PHONY: docker-run-mongo
35-
docker-run-mongo: mongo-image
36-
$(run_mongo)
37-
3822
.PHONY: docker-shell-es
3923
docker-shell-es:
4024
$(run_es) /bin/bash
4125

42-
.PHONY: docker-shell-mongo
43-
docker-shell-mongo:
44-
$(run_mongo) /bin/bash
45-
4626
.PHONY: test-es
4727
test-es:
4828
$(run_es) /bin/bash -c 'export && ./scripts/wait-for-it.sh elasticsearch:9200 && cd /app/stac_fastapi/elasticsearch/tests/ && pytest'
4929

50-
.PHONY: test-mongo
51-
test-mongo:
52-
$(run_mongo) /bin/bash -c 'export && cd /app/stac_fastapi/mongo/tests/ && pytest'
53-
5430
.PHONY: run-es-database
5531
run-es-database:
56-
docker-compose -f docker-compose.elasticsearch.yml run --rm elasticsearch
57-
58-
.PHONY: run-mongo-database
59-
run-mongo-database:
60-
docker-compose -f docker-compose.mongo.yml run --rm mongo_db
32+
docker-compose run --rm elasticsearch
6133

6234
.PHONY: test
63-
test: test-elasticsearch test-mongo
35+
test: test-elasticsearch
6436

6537
.PHONY: pybase-install
6638
pybase-install:
@@ -73,10 +45,6 @@ pybase-install:
7345
es-install: pybase-install
7446
pip install -e ./stac_fastapi/elasticsearch[dev,server]
7547

76-
.PHONY: mongo-install
77-
mongo-install: pybase-install
78-
pip install -e ./stac_fastapi/mongo[dev,server]
79-
8048
.PHONY: docs-image
8149
docs-image:
8250
docker-compose -f docker-compose.docs.yml \

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
# stac-fastapi-nosql
1+
# stac-fastapi-elasticsearch
22

3-
Elasticsearch and mongodb backends for stac-fastapi.
3+
Elasticsearch backend for stac-fastapi.
4+
5+
**WIP** This backend is not yet stable (notice no releases yet), so use the pgstac backend instead.
46

57
------
68
#### Running API on localhost:8083
79

8-
```docker-compose -f docker-compose.mongo.yml up``` **or**
9-
10-
```docker-compose -f docker-compose.elasticsearch.yml up```
10+
```docker-compose up```
1111

1212
------
1313
#### Testing
1414

15-
16-
```make test-mongo``` **or**
17-
1815
```make test-es```

docker-compose.mongo.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

docker-compose.elasticsearch.yml renamed to docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
restart: always
88
build:
99
context: .
10-
dockerfile: Dockerfile.elasticsearch
10+
dockerfile: Dockerfile
1111
platform: linux/amd64
1212
environment:
1313
- APP_HOST=0.0.0.0

scripts/publish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SUBPACKAGE_DIRS=(
1313
"stac_fastapi/api"
1414
"stac_fastapi/sqlalchemy"
1515
"stac_fastapi/pgstac"
16-
"stac_fastapi/mongo"
16+
"stac_fastapi/elasticsearch"
1717
)
1818

1919
function usage() {

0 commit comments

Comments
 (0)