-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
37 lines (31 loc) · 874 Bytes
/
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
-include .env
tf_vars := TF_VAR_gcp_project_id=$(GCP_PROJECT_ID) \
TF_VAR_gcp_region=$(GCP_REGION) \
TF_VAR_gcp_zone=$(GCP_ZONE) \
TF_VAR_prefix=$(PREFIX) \
TF_VAR_terraform_state_bucket=$(TERRAFORM_STATE_BUCKET)
.PHONY: init
init:
@ printf "Initializing Terraform\n\n"
@ terraform init -reconfigure -input=false -backend-config="bucket=${TERRAFORM_STATE_BUCKET}"
@ $(tf_vars) terraform apply -target=module.init -auto-approve -input=false -compact-warnings
.PHONY: plan
plan:
@ printf "Planning Terraform\n\n"
@ terraform fmt -recursive
@ $(tf_vars) terraform plan -compact-warnings -detailed-exitcode
.PHONY: apply
apply:
@ printf "Applying Terraform\n\n"
@ $(tf_vars) \
terraform apply \
-auto-approve \
-input=false \
-compact-warnings
.PHONY: run
run:
docker-compose up -d --build
cd frontend && pnpm dev
.PHONY: stop
stop:
docker-compose down