-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
174 lines (141 loc) · 5 KB
/
Makefile
File metadata and controls
174 lines (141 loc) · 5 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
ORG=hexagram30
#############################################################################
### Kafka ###############################################################
#############################################################################
kafka-image: PROJ=kafka
kafka-image: VERS=2.12-1.0.1
kafka-image:
docker build -t $(ORG)/$(PROJ):$(VERS) ./kafka
#############################################################################
### Redis Builder #######################################################
#############################################################################
redis-builder-dockerfile: VERS=4.0.8
redis-builder-dockerfile:
cat ./redis-graph/builder/Dockerfile.in | \
sed -e 's/{{VERSION}}/$(VERS)/g' > \
./redis-graph/builder/Dockerfile
redis-builder: PROJ=redis-graph-builder
redis-builder: VERS=4.0.8
redis-builder: redis-builder-dockerfile
docker build \
-t $(ORG)/$(PROJ):$(VERS) \
redis-graph/builder
redis-builder-run: PROJ=redis-graph-builder
redis-builder-run: VERS=4.0.8
redis-builder-run:
-@redis-builder-stop
rm -rf /tmp/docker-redis-builder-container-id
docker run \
-d \
-p 50999:50999 \
--cidfile=/tmp/docker-redis-builder-container-id \
$(ORG)/$(PROJ):$(VERS)
redis-builder-stop:
docker stop \
`cat /tmp/docker-redis-builder-container-id`
redis-builder-bash: PROJ=redis-graph-builder
redis-builder-bash: VERS=4.0.8
redis-builder-bash:
docker run \
-it \
$(ORG)/$(PROJ):$(VERS) \
bash
redis-builder-copy: redis-builder redis-builder-run
nc localhost 50999 > redis-graph/redisgraph.so
$(MAKE) redis-builder-stop
#############################################################################
### Redis Graph #########################################################
#############################################################################
redis-graph-dockerfile: VERS=4.0.8
redis-graph-dockerfile:
cat ./redis-graph/Dockerfile.in | \
sed -e 's/{{VERSION}}/$(VERS)/g' > \
./redis-graph/Dockerfile
redis-graph: PROJ=redis-graph
redis-graph: VERS=4.0.8
redis-graph: redis-graph-dockerfile
docker build \
-t $(ORG)/$(PROJ):$(VERS) \
redis-graph
redis-graph-run: PROJ=redis-graph
redis-graph-run: VERS=4.0.8
redis-graph-run:
-@redis-graph-stop
rm -rf /tmp/docker-redis-graph-container-id
docker run \
-it \
-p 6379:6379 \
-v ./data:/data \
--cidfile=/tmp/docker-redis-graph-container-id \
$(ORG)/$(PROJ):$(VERS)
redis-graph-stop: PROJ=redis-graph
redis-graph-stop: VERS=4.0.8
redis-graph-stop:
docker stop \
`cat /tmp/docker-redis-graph-container-id`
redis-graph-publish: PROJ=redis-graph
redis-graph-publish: VERS=4.0.8
redis-graph-publish:
docker push $(ORG)/$(PROJ):$(VERS)
#############################################################################
### Redix ###############################################################
#############################################################################
DOCKER_DIR = docker
REDIX_VERSION = 1.10
redix-image:
@docker build -t $(ORG)/redixdb redixdb
@docker tag $(ORG)/redixdb $(ORG)/redixdb:latest
@docker tag $(ORG)/redixdb $(ORG)/redixdb:$(REDIX_VERSION)
redix-publish:
@docker push $(ORG)/redixdb:latest
@docker push $(ORG)/redixdb:$(REDIX_VERSION)
redix-run:
@docker run -it \
-p 7090:7090 -p 6380:6380 \
-v `pwd`/data/redixdb:/data \
$(ORG)/redixdb:latest \
-engine boltdb \
-storage /data \
-verbose
#############################################################################
### Planet ##############################################################
#############################################################################
planet-image:
@cd ./planet && $(MAKE) image
planet-publish:
@cd ./planet && $(MAKE) publish
planet-help:
@cd ./planet && $(MAKE) help
planet-usage:
@cd ./planet && $(MAKE) usage
#############################################################################
### Noise ###############################################################
#############################################################################
PROJ = noise
DOCKER_DIR = $(PROJ)
NOISE_VERSION = 0.6.0
GUEST_BUILDER_BASE_DIR = /volume/noise-rs
GUEST_BUILDER_BUILD_DIR = $(GUEST_BASE_DIR)/target/x86_64-unknown-linux-musl
EXAMPLES_DIR = example_images
EXAMPLES_BUILDER_DIR = $(GUEST_BUILD_DIR)/debug/examples/$(EXAMPLES_DIR)
noise-image:
@docker build -t $(ORG)/$(PROJ) $(DOCKER_DIR)
@docker tag $(ORG)/$(PROJ) $(ORG)/$(PROJ):latest
@docker tag $(ORG)/$(PROJ) $(ORG)/$(PROJ):$(NOISE_VERSION)
noise-publish:
@docker push $(ORG)/$(PROJ):latest
@docker push $(ORG)/$(PROJ):$(NOISE_VERSION)
noise-shell:
@docker run -it \
--entrypoint bash \
-v `pwd`/example-images:$(EXAMPLES_BUILDER_DIR) \
5d3e58ef9872
noise: noise-image
@docker run \
-v `pwd`/example-images:/$(EXAMPLES_DIR) \
hexagram30/noise
@ls -alrt `pwd`/example-images
#############################################################################
### Miscellaneous #######################################################
#############################################################################
.PHONY: redis-graph noise