-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (40 loc) · 1.05 KB
/
Makefile
File metadata and controls
52 lines (40 loc) · 1.05 KB
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
export AWS_ACCESS_KEY_ID ?= test
export AWS_SECRET_ACCESS_KEY ?= test
export AWS_DEFAULT_REGION = us-east-1
init:
terraform workspace new local &
terraform workspace new aws &
terraform init
build:
docker build . --file Dockerfile-localstack --output .
build-aws:
docker build . --file Dockerfile-aws --output .
deploy:
docker compose up --detach
terraform workspace select local
AWS_ENDPOINT_URL=https://localhost.localstack.cloud:4566 terraform apply --auto-approve
deploy-aws:
terraform workspace select aws
terraform apply --auto-approve
run:
terraform workspace select local
./start_job.sh local
run-aws:
terraform workspace select aws
./start_job.sh aws
stop:
docker compose down
logs:
@localstack logs > logs.txt
cat logs.txt
destroy:
terraform workspace select local
./stop-application.sh
terraform destroy --auto-approve
destroy-aws:
terraform workspace select aws
./stop-application.sh aws
terraform destroy --auto-approve
test-ci:
make init build deploy logs run; return_code=`echo $$?`;\
make logs; make stop; exit $$return_code;