forked from hexlet-codebattle/codebattle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
128 lines (110 loc) · 5.16 KB
/
Makefile
File metadata and controls
128 lines (110 loc) · 5.16 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
include make-compose.mk
pg:
podman-compose up -d db-local
clean:
rm -rf services/app/_build
rm -rf services/app/deps
rm -rf services/app/.elixir_ls
rm -rf services/app/priv/static
rm -rf node_modules
rm -rf tmp/battle_asserts
test:
make -C ./services/app/ test
test-code-checkers:
make -C ./services/app/ test-code-checkers
terraform-vars-generate:
podman run --rm -it -v $(CURDIR):/app -w /app williamyeh/ansible:alpine3 ansible-playbook ansible/terraform.yml -i ansible/production -vv --vault-password-file=tmp/ansible-vault-password
setup: setup-env compose-setup
setup-env:
podman run --rm -v $(CURDIR):/app -w /app williamyeh/ansible:alpine3 ansible-playbook ansible/development.yml -i ansible/development -vv
setup-env-local:
ansible-playbook ansible/development.yml -i ansible/development -vv
ansible-edit-secrets:
ansible-vault edit --vault-password-file tmp/ansible-vault-password ansible/production/group_vars/all/vault.yml
ansible-vault-edit-production:
podman run --rm -it -v $(CURDIR):/app -w /app williamyeh/ansible:alpine3 ansible-vault edit --vault-password-file tmp/ansible-vault-password ansible/production/group_vars/all/vault.yml
release:
make -C services/app release
build-local:
docker build --target assets-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:assets-image services/app
docker build --target compile-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:compile-image services/app
docker build --target nginx-assets \
--file services/app/Containerfile.codebattle \
--tag ghcr.io/hexlet-codebattle/nginx-assets:latest services/app
docker build --target runtime-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:latest services/app
docker build --target compile-image \
--file services/app/Containerfile.runner \
--tag ghcr.io/hexlet-codebattle/runner:compile-image services/app
docker build --target runtime-image \
--file services/app/Containerfile.runner \
--tag ghcr.io/hexlet-codebattle/runner:latest services/app
build-codebattle:
docker pull ghcr.io/hexlet-codebattle/codebattle:assets-image || true
docker pull ghcr.io/hexlet-codebattle/codebattle:compile-image || true
docker pull ghcr.io/hexlet-codebattle/codebattle:latest || true
docker build --target assets-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:assets-image services/app
docker build --target compile-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:compile-image services/app
docker build --target nginx-assets \
--file services/app/Containerfile.codebattle \
--tag ghcr.io/hexlet-codebattle/nginx-assets:latest services/app
docker build --target runtime-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:latest services/app
build-arm:
docker build --platform linux/arm64 \
--target assets-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:assets-image-arm services/app
docker build --platform linux/arm64 \
--target compile-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:compile-image-arm services/app
docker build --platform linux/arm64 \
--target nginx-assets \
--file services/app/Containerfile.codebattle \
--tag ghcr.io/hexlet-codebattle/nginx-assets:arm services/app
docker build --platform linux/arm64 \
--target runtime-image \
--file services/app/Containerfile.codebattle \
--build-arg GIT_HASH=$(GIT_HASH) \
--tag ghcr.io/hexlet-codebattle/codebattle:arm services/app
push-codeabttle-arm:
docker push ghcr.io/hexlet-codebattle/codebattle:assets-image-arm
docker push ghcr.io/hexlet-codebattle/codebattle:compile-image-arm
docker push ghcr.io/hexlet-codebattle/codebattle:arm
docker push ghcr.io/hexlet-codebattle/nginx-assets:arm
push-codebattle:
docker push ghcr.io/hexlet-codebattle/codebattle:assets-image
docker push ghcr.io/hexlet-codebattle/codebattle:compile-image
docker push ghcr.io/hexlet-codebattle/codebattle:latest
docker push ghcr.io/hexlet-codebattle/nginx-assets:latest
build-runner:
docker pull ghcr.io/hexlet-codebattle/runner:compile-image || true
docker pull ghcr.io/hexlet-codebattle/runner:latest || true
docker build --target compile-image \
--file services/app/Containerfile.runner \
--tag ghcr.io/hexlet-codebattle/runner:compile-image services/app
docker build --target runtime-image \
--file services/app/Containerfile.runner \
--tag ghcr.io/hexlet-codebattle/runner:latest services/app
push-runner:
docker push ghcr.io/hexlet-codebattle/runner:compile-image
docker push ghcr.io/hexlet-codebattle/runner:latest