-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
50 lines (39 loc) · 1.21 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
SHELL := /bin/bash # to enable source command in run_app
MODULE=weevenetwork/zaikio-output
VERSION_NAME=v1.0.0
lint:
black src/
flake8 src/
.phony: lint
run_app:
set -a && source .env && set +a && python src/main.py
.phony: run_app
create_image:
docker build -t ${MODULE}:${VERSION_NAME} . -f docker/Dockerfile
.phony: create_image
run_image:
docker run -p 80:80 --rm --env-file=./.env ${MODULE}:${VERSION_NAME}
.phony: run_image
debug_image:
docker run -p 80:80 --rm --env-file=./.env --entrypoint /bin/bash -it ${MODULE}:${VERSION_NAME}
.phony: debug_image
run_docker_compose:
docker-compose -f docker/docker-compose.yml up
.phony: run_docker_compose
stop_docker_compose:
docker-compose -f docker/docker-compose.yml down
.phony: stop_docker_compose
push_latest:
docker image push ${MODULE}:${VERSION_NAME}
.phony: push_latest
create_and_push_multi_platform:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 -t ${MODULE}:${VERSION_NAME} --push . -f docker/Dockerfile
.phony: create_and_push_multi_platform
run_listener:
docker run --rm -p 8000:8000 \
-e PORT=8000 \
-e LOG_HTTP_BODY=true \
-e LOG_HTTP_HEADERS=true \
--name listener \
jmalloc/echo-server
.phony: run_listener