forked from gofiber/recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (26 loc) · 815 Bytes
/
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
.PHONY: run docker.rabbitmq docker.worker docker.stop
run:
go run main.go
docker.worker: docker.worker.build
docker run --rm \
--name dev-rabbitmq-worker \
--network dev-network \
dev-rabbitmq-worker
docker.rabbitmq:
docker run --rm -d \
--name dev-rabbitmq \
--hostname dev-rabbitmq \
--network dev-network \
-v ${HOME}/dev-rabbitmq:/var/lib/rabbitmq \
-v ${PWD}/configs/definitions.json:/opt/definitions.json:ro \
-v ${PWD}/configs/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro \
-p 5672:5672 \
-p 15672:15672 \
rabbitmq:3-management
docker.worker.build:
cd worker && docker build -t dev-rabbitmq-worker .
docker.stop:
docker stop dev-rabbit docker.worker
docker.network:
docker network inspect dev-network >/dev/null 2>&1 || \
docker network create -d bridge dev-network