-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
52 lines (39 loc) · 1.38 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
# OSX uses the group id `20` for the user & alpine has already a group
# with that id causing compatibility issues
# This conditional checks if group id `20` is used and uses `1111` instead.
GROUP_ID?=$$(if [ $$(id -g) = '20' ]; then echo 1111; else id -g; fi)
USER_ID?=$$(id -u)
TARGET_TAG=latest
build:
make _build TARGET_IMAGE=transifex-delivery-devel
build_prod:
make _build TARGET_IMAGE=transifex-delivery
_build:
docker build \
--build-arg USER_ID=${USER_ID} \
--build-arg GROUP_ID=${GROUP_ID} \
--target ${TARGET_IMAGE} \
-t ${TARGET_IMAGE}:${TARGET_TAG} .
trivy:
make build_prod && \
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
aquasec/trivy image \
--no-progress --ignore-unfixed --severity HIGH,CRITICAL \
transifex-delivery:latest
up:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
eslint:
docker-compose run --rm transifex-delivery npm run eslint
ci-tests:
docker-compose run --rm transifex-delivery npm test
test:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml run --rm transifex-delivery npm test
stop:
docker-compose stop
shell:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml run --rm transifex-delivery sh
delete:
docker-compose down --rmi local -v
debug:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml run --rm --service-ports transifex-delivery npm run start-debugger