Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containerise #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM redislabs/redistimeseries:0.2.0 as redistimeseries
FROM redislabs/redisgraph:1.2.0 as redisgraph
FROM redislabs/redisearch:1.4.8 as redisearch
FROM redislabs/redisgears:0.2.1 as redisgears

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using the latest and greatest instead... i.e. v0.3.0


ENV LD_LIBRARY_PATH /usr/lib/redis/modules/

COPY --from=redistimeseries /usr/lib/redis/modules/*.so* "$LD_LIBRARY_PATH"
COPY --from=redisgraph /usr/lib/redis/modules/*.so* "$LD_LIBRARY_PATH"
COPY --from=redisearch /usr/lib/redis/modules/*.so* "$LD_LIBRARY_PATH"

WORKDIR /app
ADD . /app

ENTRYPOINT [ "./script.sh" ]
24 changes: 13 additions & 11 deletions script.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#!/bin/bash -x
nohup redis-server &
sleep 5

redis-cli MODULE LOAD `pwd`/redisgears.so
redis-cli MODULE LOAD /usr/lib/redis/modules/redisgears.so "PythonHomeDir" "/usr/lib/redis/modules/deps/cpython/"

read

redis-cli HSET marsman:100 Name Douglas Last Quaid
redis-cli HSET marsman:101 Name Lori Last Quaid # Quaid's seemingly loving wife
redis-cli HSET marsman:102 Name Melina Last Melina
redis-cli HSET marsman:102 Name Melina Last Melina

read -p "Back to slides..."

######## RediSearch #################################################################################################
######## RediSearch #################################################################################################

redis-cli MODULE LOAD `pwd`/redisearch.so SAFEMODE
redis-cli MODULE LOAD /usr/lib/redis/modules/redisearch.so SAFEMODE

read

Expand All @@ -39,18 +41,18 @@ redis-cli FT.SEARCH marsmen Qu*

read -p "Back to slides..."

redis-cli HSET marsman:103 Name Vilos Last Cohaagen # Governor of the Mars
redis-cli HSET marsman:104 Name Bob Last McClane # Rekall manager and sales agent
redis-cli HSET marsman:103 Name Vilos Last Cohaagen # Governor of the Mars
redis-cli HSET marsman:104 Name Bob Last McClane # Rekall manager and sales agent
redis-cli HSET marsman:105 Name Harry Last Harry # Douglas friend
read

redis-cli FT.SEARCH marsmen mcc*

read -p "Back to slides..."

######## RedisGraph #################################################################################################
######## RedisGraph #################################################################################################

redis-cli MODULE LOAD `pwd`/redisgraph.so
redis-cli MODULE LOAD /usr/lib/redis/modules/redisgraph.so

read

Expand Down Expand Up @@ -98,17 +100,17 @@ redis-cli GRAPH.QUERY marsmen "MATCH (n)-[:Relation]->(m) return n.Name, m.Name"

read -p "Back to slides..."

redis-cli HDEL marsman:101 Relation # Quaid killed! Lori
redis-cli HDEL marsman:101 Relation # Quaid killed! Lori

read

redis-cli GRAPH.QUERY marsmen "MATCH (n)-[:Relation]->(m) return n.Name, m.Name"

read -p "Back to slides..."

######## RedisTimeSeries ############################################################################################
######## RedisTimeSeries ############################################################################################

redis-cli MODULE LOAD `pwd`/redistimeseries.so
redis-cli MODULE LOAD /usr/lib/redis/modules/redistimeseries.so

read

Expand Down