-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (18 loc) · 697 Bytes
/
Makefile
File metadata and controls
23 lines (18 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include .env
export
setup:
@if [ ! -d "serverless" ]; then \
echo "installing serverless ..."; \
docker-compose run --rm serverless_go serverless install --url https://github.com/serverless/serverless; \
fi
build: setup
cd api; env GOOS=linux go build -tags aws_lambda -ldflags="-s -w" -o ../bin/api main.go
cd message; env GOOS=linux go build -tags aws_lambda -ldflags="-s -w" -o ../bin/message main.go
deploy:
docker-compose build serverless_go
docker-compose run --rm serverless_go serverless deploy -v --stage=${STAGE}
cleanup:
docker-compose build serverless_go
docker-compose run --rm serverless_go serverless remove -v --stage=${STAGE}
run-local:
@cd api; go run main.go