-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (51 loc) · 1.8 KB
/
Makefile
File metadata and controls
77 lines (51 loc) · 1.8 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
compose-setup: env-prepare compose-build compose-install
compose-build:
docker-compose build
compose-install:
docker-compose run app make install
compose-bash:
docker compose run app bash
compose-lint:
docker-compose run app make lint
compose-lint-ci:
docker-compose -f docker-compose.yml run app make lint
compose-test:
docker-compose run app make test
compose-test-ci:
docker-compose -f docker-compose.yml run app make test
compose-console:
docker-compose run --rm app bash
compose:
docker-compose up --abort-on-container-exit
compose-down:
docker-compose down -v --remove-orphans
docker-push:
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml push app
setup: env-prepare install
install:
npm ci
start:
npm start
lint:
npx eslint .
lint-fix:
npx eslint . --fix
test:
npm test
env-prepare:
cp -n .env.example .env || true
deploy:
ansible-playbook ansible/release.yml -i inventory.ini --extra-vars "version=$V"
ssh:
ssh root@`yq e '.all.children.webservers.hosts.web1.ansible_host' ansible/inventory.yml`
# Для запуска x86-образа на ARM (например, Mac M1/M2):
# docker run --platform linux/amd64 -p 3000:3000 -e SERVER_MESSAGE="Hexlet Awesome Server" hexletcomponents/devops-example-app
multiarch-build-app:
docker buildx build --platform linux/amd64,linux/arm64 -t hexletcomponents/devops-example-app .
multiarch-build-caddy:
docker buildx build --platform linux/amd64,linux/arm64 -t hexletcomponents/devops-example-caddy -f services/caddy/Dockerfile .
multiarch-push-app:
docker buildx build --platform linux/amd64,linux/arm64 -t hexletcomponents/devops-example-app --push .
multiarch-push-caddy:
docker buildx build --platform linux/amd64,linux/arm64 -t hexletcomponents/devops-example-caddy -f services/caddy/Dockerfile --push .