-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.dist
38 lines (29 loc) · 973 Bytes
/
Makefile.dist
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
#!/bin/bash
CONFIG = .env
include ${CONFIG}
help: ## Show this help message
@echo 'usage: make [target]'
@echo
@echo 'targets:'
@egrep '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#'
run: ## Start the Redis container
docker rm $(REDIS_NAME) || true
docker run -d \
--name=$(REDIS_NAME) \
-p $(REDIS_PORT):6379 \
-p $(REDISINSIGHT_PORT):8001 \
-v `pwd`/data:/data \
--restart=$(REDIS_RESTART) \
$(REDIS_IMAGE)
stop: ## Stop the Redis container
docker stop $(REDIS_NAME)
restart: ## Restart the Redis container
docker restart $(REDIS_NAME)
redis-cli: ## Connecting to the Redis instance via redis-cli
docker exec -it $(REDIS_NAME) redis-cli
ssh-redis: ## SSH into the Redis container
docker exec -it $(REDIS_NAME) bash
ssh-redis-root: ## SSH into the Redis container as root
docker exec -it -u root $(REDIS_NAME) bash
logs-redis: ## Show logs of the Redis container (with --follow option set)
docker logs --follow $(REDIS_NAME)