-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
56 lines (46 loc) · 2.26 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
test-create-db:
@echo "Creating Tarmo database..."
curl -XPOST "http://localhost:8081/2015-03-31/functions/function/invocations" -d '{"event_type" : 1}'
test-migrate-db:
@echo "Migrating Tarmo database..."
curl -XPOST "http://localhost:8081/2015-03-31/functions/function/invocations" -d '{"event_type" : 3}'
test-lipas:
@echo "Loading Lipas data..."
curl -XPOST "http://localhost:8080/2015-03-31/functions/function/invocations" -d '{"close_to_lon": 23.7747, "close_to_lat": 61.4980, "radius": 20}' --connect-timeout 900
test-osm:
@echo "Loading OSM data..."
curl -XPOST "http://localhost:8082/2015-03-31/functions/function/invocations" -d '{"close_to_lon": 23.7747, "close_to_lat": 61.4980, "radius": 50}'
test-wfs:
@echo "Loading WFS data..."
curl -XPOST "http://localhost:8083/2015-03-31/functions/function/invocations" -d '{}'
test-arcgis:
@echo "Loading ArcGIS data..."
curl -XPOST "http://localhost:8085/2015-03-31/functions/function/invocations" -d '{"close_to_lon": 23.7747, "close_to_lat": 61.4980, "radius": 50}'
test-all-layers: test-create-db test-lipas test-osm test-wfs test-arcgis
revision:
cd backend; \
alembic revision -m "$(name)" | sed -E "s/.*([0-9a-f]{12})_([a-z_]+)\.py.*/\1/" | \
xargs -I {} mkdir databasemodel/alembic/versions/{}
pytest:
docker-compose -f docker-compose.dev.yml down -v
docker-compose -f docker-compose.dev.yml build db_manager lipas_loader osm_loader wfs_loader arcgis_loader
cd backend; pytest
rebuild:
docker-compose -f docker-compose.dev.yml down -v
docker-compose -f docker-compose.dev.yml build db_manager lipas_loader osm_loader wfs_loader arcgis_loader
docker-compose -f docker-compose.dev.yml up -d
build-lambda:
docker-compose -f docker-compose.dev.yml build db_manager lipas_loader osm_loader wfs_loader arcgis_loader notifier
docker-compose -f docker-compose.dev.yml up -d --no-deps db_manager lipas_loader osm_loader wfs_loader arcgis_loader notifier
cd backend/lambda_functions; \
for func in db_manager lipas_loader osm_loader wfs_loader arcgis_loader notifier ; do \
rm -rf tmp_lambda; \
echo $$func; \
docker cp tarmo_$${func}_1:/var/task tmp_lambda; \
cd tmp_lambda; \
zip -r ../"$${func}.zip" .; \
cd ..; \
rm -rf tmp_lambda; \
done
cd ../..
docker-compose -f docker-compose.dev.yml down -v