forked from hexlet-codebattle/codebattle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make-compose.mk
84 lines (57 loc) · 2.23 KB
/
make-compose.mk
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
ASSERTS_PATH = "tmp/battle_asserts"
compose:
docker compose up app
compose-d:
docker compose up -d app
compose-build:
docker compose build
compose-down:
docker compose down -v || true
compose-test-code-checkers:
docker compose run --rm --name codebattle_app app mix test test/code_check
compose-test-yarn:
docker compose run --rm --name codebattle_app app yarn test
compose-test:
docker compose run --rm --name codebattle_app app mix test --exclude code_check
compose-kill:
docker compose kill
compose-bash:
docker compose run app bash
compose-install-mix:
docker compose run --rm --name codebattle_app app mix deps.get
compose-install-yarn:
docker compose run --rm --name codebattle_app app yarn
compose-install: compose-install-mix compose-install-yarn
compose-setup: compose-down compose-build compose-install compose-db-init
compose-db-init:
docker compose run --rm --name codebattle_app app mix ecto.create
docker compose run --rm --name codebattle_app app mix ecto.migrate
docker compose run --rm --name codebattle_app app mix run priv/repo/seeds.exs
compose-db-migrate:
docker compose run --rm --name codebattle_app app mix ecto.migrate
compose-lint: compose-mix-format compose-mix-credo compose-lint-js-fix
compose-mix-format:
docker compose run --rm --name codebattle_app app mix format
compose-mix-credo:
docker compose run app mix credo
compose-lint-js-fix:
docker compose run --rm --name codebattle_app app yarn lint --fix
compose-console:
docker compose run --rm --name codebattle_app app iex -S mix
compose-restart:
docker compose restart
compose-stop:
docker compose stop
compose-logs:
docker compose logs -f --tail=100
compose-upload-asserts:
rm -rf $(ASSERTS_PATH)
git clone "https://github.com/hexlet-codebattle/battle_asserts.git" $(ASSERTS_PATH)
cd $(ASSERTS_PATH) && make generate-from-docker
docker compose run --rm --name codebattle_app -v $(CURDIR)/tmp:/app/tmp app mix issues.upload $(ASSERTS_PATH)/issues
compose-build-dockers:
docker compose run --rm --name codebattle_app app mix dockers.build ${lang}
compose-pull-dockers:
docker compose run --rm --name codebattle_app app mix dockers.pull ${lang}
compose-push-dockers:
docker compose run --rm --name codebattle_app app mix dockers.push ${lang}