-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
51 lines (36 loc) · 1.07 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
service=faust-project
worker=example.app
partitions=4
bash:
docker-compose run --user=$(shell id -u) ${service} bash
# Build docker image
build:
docker-compose build
restart:
docker-compose restart ${service}
run:
docker-compose up
logs:
docker-compose logs
# Removes old containers, free's up some space
remove:
# Try this if this fails: docker rm -f $(docker ps -a -q)
docker-compose rm --force -v
remove-network:
docker network rm faust-docker-compose_default
stop:
docker-compose stop
run-dev: build run
clean: stop remove remove-network
# Kafka related
create-topic:
docker-compose exec kafka kafka-topics --zookeeper zookeeper:32181 \
--create ${topic-name} --if-not-exists \
--partitions ${partitions} --topic ${topic-name} --replication-factor 1
create-page-view-topic:
@$(MAKE) create-topic topic-name=page_views
list-topics:
docker-compose exec kafka kafka-topics --list --zookeeper zookeeper:32181
# Faust commands related
send-page-view-event:
docker-compose exec -e SIMPLE_SETTINGS=settings ${service} faust -A ${worker} send page_views '${payload}'