Skip to content

Commit 31dcae9

Browse files
committed
update makefile
1 parent ae9d6ea commit 31dcae9

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

Makefile

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ run_os = docker-compose \
2727
-e APP_PORT=${OS_APP_PORT} \
2828
app-opensearch
2929

30-
.PHONY: image-deploy
31-
image-deploy:
32-
docker build -f Dockerfile.deploy -t stac-fastapi-elasticsearch:latest .
30+
.PHONY: image-deploy-es
31+
image-deploy-es:
32+
docker build -f Dockerfile.deploy.es -t stac-fastapi-elasticsearch:latest .
33+
34+
.PHONY: image-deploy-os
35+
image-deploy-os:
36+
docker build -f Dockerfile.deploy.os -t stac-fastapi-opensearch:latest .
3337

3438
.PHONY: run-deploy-locally
3539
run-deploy-locally:
@@ -44,30 +48,38 @@ run-deploy-locally:
4448
image-dev:
4549
docker-compose build
4650

47-
.PHONY: docker-run
48-
docker-run: image-dev
51+
.PHONY: docker-run-es
52+
docker-run-es: image-dev
4953
$(run_es)
5054

51-
.PHONY: docker-shell
55+
.PHONY: docker-run-os
56+
docker-run-es: image-dev
57+
$(run_os)
58+
59+
.PHONY: docker-shell-es
5260
docker-shell:
5361
$(run_es) /bin/bash
5462

63+
.PHONY: docker-shell-os
64+
docker-shell:
65+
$(run_os) /bin/bash
66+
5567
.PHONY: test-elasticsearch
5668
test:
5769
-$(run_es) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh elasticsearch:9200 && cd /app/stac_fastapi/elasticsearch/tests/ && pytest'
5870
docker-compose down
5971

6072
.PHONY: test-opensearch
6173
test-opensearch:
62-
-$(run_os) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh opensearch:9202 && cd /app/stac_fastapi/elasticsearch/tests/ && pytest'
74+
-$(run_os) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh opensearch:9202 && cd /app/stac_fastapi/opensearch/tests/ && pytest'
6375
docker-compose down
6476

6577
.PHONY: test
6678
test:
6779
-$(run_es) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh elasticsearch:9200 && cd /app/stac_fastapi/elasticsearch/tests/ && pytest'
6880
docker-compose down
6981

70-
-$(run_os) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh opensearch:9202 && cd /app/stac_fastapi/elasticsearch/tests/ && pytest'
82+
-$(run_os) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh opensearch:9202 && cd /app/stac_fastapi/opensearch/tests/ && pytest'
7183
docker-compose down
7284

7385
.PHONY: run-database-es
@@ -83,12 +95,17 @@ pybase-install:
8395
pip install wheel && \
8496
pip install -e ./stac_fastapi/api[dev] && \
8597
pip install -e ./stac_fastapi/types[dev] && \
86-
pip install -e ./stac_fastapi/extensions[dev]
98+
pip install -e ./stac_fastapi/extensions[dev] && \
99+
pip install -e ./stac_fastapi/core
87100

88-
.PHONY: install
89-
install: pybase-install
101+
.PHONY: install-es
102+
install-es: pybase-install
90103
pip install -e ./stac_fastapi/elasticsearch[dev,server]
91104

105+
.PHONY: install-os
106+
install-os: pybase-install
107+
pip install -e ./stac_fastapi/opensearch[dev,server]
108+
92109
.PHONY: ingest
93110
ingest:
94111
python3 data_loader/data_loader.py

0 commit comments

Comments
 (0)