-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (63 loc) · 1.61 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
####################
# General
####################
build:
docker build \
--tag useparagon/aws-self-hosted \
-f Dockerfile \
.
tf-version:
docker run \
-it \
--rm useparagon/aws-self-hosted:latest \
bash -c "terraform --version"
####################
# Get Terraform state
####################
state-infra:
docker run \
-it \
--mount source="$(shell pwd)",target=/usr/src/app,type=bind \
--rm useparagon/aws-self-hosted:latest \
ts-node "scripts/cli" state-infra
state-paragon:
docker run \
--mount source="$(shell pwd)",target=/usr/src/app,type=bind \
--rm useparagon/aws-self-hosted:latest \
ts-node "scripts/cli" state-paragon
####################
# Deploy
####################
deploy-infra:
docker run \
-it \
--env debug=$(debug) \
--env initialize=$(initialize) \
--env plan=$(plan) \
--env apply=$(apply) \
--env destroy=$(destroy) \
--env target=$(target) \
--env args=$(args) \
--mount source="$(shell pwd)",target=/usr/src/app,type=bind \
--rm useparagon/aws-self-hosted:latest \
ts-node "scripts/cli" deploy-infra
deploy-paragon:
docker run \
-it \
--env debug=$(debug) \
--env initialize=$(initialize) \
--env plan=$(plan) \
--env apply=$(apply) \
--env destroy=$(destroy) \
--env target=$(target) \
--env args=$(args) \
--mount source="$(shell pwd)",target=/usr/src/app,type=bind \
--rm useparagon/aws-self-hosted:latest \
ts-node "scripts/cli" deploy-paragon
####################
# Prepare Terraform files without Docker
####################
prepare-infra:
ts-node "scripts/cli" prepare-infra
prepare-paragon:
ts-node "scripts/cli" prepare-paragon