1
0
Fork 0
lightspeed-watcher/Makefile

26 lines
778 B
Makefile
Raw Permalink Normal View History

2018-03-08 11:25:10 -05:00
yarnbin = $(shell yarn bin)
2018-06-13 19:06:05 -04:00
run:
sh -c "source .env; $(yarnbin)/serverless offline"
2018-03-08 11:25:10 -05:00
test:
sh -c "source .env; $(yarnbin)/serverless invoke local --function check"
deploy:
sh -c "source .env.production; $(yarnbin)/serverless deploy"
setup:
docker-compose up -d
aws dynamodb create-table \
--endpoint-url http://localhost:8898 \
--table-name lightspeed-checks-dev \
--attribute-definitions '[{"AttributeName":"area","AttributeType":"S"},{"AttributeName":"time","AttributeType":"S"}]' \
--key-schema '[{"AttributeName":"area","KeyType":"HASH"},{"AttributeName":"time","KeyType":"RANGE"}]' \
--provisioned-throughput '{"ReadCapacityUnits":1,"WriteCapacityUnits":1}' \
--region local
cleanup:
docker-compose stop && docker-compose rm -f
reboot: cleanup setup