-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
46 lines (35 loc) · 1.15 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
# Install Project Dependencies
install:
pip install -r requirements.txt
# Run Project Unit Tests
test:
python app/tests/test_dummies.py
# Build Staging Image
build_stg:
sudo docker build -t staging .
# Build Production Image
build_prod:
sudo docker build -t prod .
# Tag & Push Staging Image
tag_stg:
sudo docker tag staging:latest 984084214586.dkr.ecr.us-east-1.amazonaws.com/staging:latest
$(aws ecr get-login --no-include-email --region us-east-1)
sudo docker push 984084214586.dkr.ecr.us-east-1.amazonaws.com/staging:latest
# Tag & Push Production Image
tag_prod:
sudo docker tag prod:latest 984084214586.dkr.ecr.us-east-1.amazonaws.com/prod:latest
$(aws ecr get-login --no-include-email --region us-east-1)
sudo docker push 984084214586.dkr.ecr.us-east-1.amazonaws.com/prod:latest
deploy_stg:
ansible-playbook -i ansible/hosts ansible/staging.yaml
deploy_prod:
ansible-playbook -i ansible/hosts ansible/production.yaml
# Terraform
vars:
cp infrastructure/terraform.tfvars.template infrastructure/terraform.tfvars
plan:
cd infrastructure/ && terraform plan
apply:
cd infrastructure/ && terraform apply
destroy:
cd infrastructure/ && terraform destroy