-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
69 lines (54 loc) · 1.5 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!make
APP_HOST ?= 0.0.0.0
EXTERNAL_APP_PORT ?= ${APP_PORT}
MONGO_APP_PORT ?= 8084
MONGO_HOST ?= docker.for.mac.localhost
MONGO_PORT ?= 27017
run_mongo = docker-compose \
run \
-p ${EXTERNAL_APP_PORT}:${MONGO_APP_PORT} \
-e PY_IGNORE_IMPORTMISMATCH=1 \
-e APP_HOST=${APP_HOST} \
-e APP_PORT=${MONGO_APP_PORT} \
app-mongo
.PHONY: image-deploy-mongo
image-deploy-mongo:
docker build -f dockerfiles/Dockerfile.dev.mongo -t stac-fastapi-mongo:latest .
.PHONY: run-deploy-locally
run-deploy-locally:
docker run -it -p 8084:8084 \
-e ES_HOST=${MONGO_HOST} \
-e ES_PORT=${MONGO_PORT} \
-e ES_USER=${MONGO_USER} \
-e ES_PASS=${MONGO_PASS} \
stac-fastapi-mongo:latest
.PHONY: image-dev
image-dev:
docker-compose build
.PHONY: docker-run-mongo
docker-run-mongo: image-dev
$(run_mongo)
.PHONY: docker-shell-mongo
docker-shell-mongo:
$(run_mongo) /bin/bash
.PHONY: test-mongo
test-mongo:
-$(run_mongo) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh mongo:27017 && cd stac_fastapi/tests/ && pytest'
docker-compose down
.PHONY: test
test:
-$(run_es) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh mongo:27017 && cd stac_fastapi/tests/ && pytest'
docker-compose down
.PHONY: run-database-mongo
run-database-mongo:
docker-compose run --rm mongo
.PHONY: pybase-install
pybase-install:
pip install wheel && \
pip install -e ./stac_fastapi/core
.PHONY: install-mongo
install-es: pybase-install
pip install -e ./stac_fastapi/mongo[dev,server]
.PHONY: ingest
ingest:
python3 data_loader/data_loader.py