Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
beagle-rcache-image
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
market
beagle-rcache-image
Commits
0c10fdef
Commit
0c10fdef
authored
Mar 23, 2020
by
iamabhishek-dubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated code
parent
efd15ddd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
+21
-6
Dockerfile
Dockerfile
+4
-0
docker-compose.yaml
docker-compose.yaml
+6
-6
healthcheck.sh
healthcheck.sh
+11
-0
redis.conf
redis.conf
+0
-0
No files found.
Dockerfile
View file @
0c10fdef
...
@@ -30,6 +30,8 @@ COPY entrypoint.sh /usr/bin/entrypoint.sh
...
@@ -30,6 +30,8 @@ COPY entrypoint.sh /usr/bin/entrypoint.sh
COPY
setupMasterSlave.sh /usr/bin/setupMasterSlave.sh
COPY
setupMasterSlave.sh /usr/bin/setupMasterSlave.sh
COPY
healthcheck.sh /usr/bin/healthcheck.sh
VOLUME
["/data"]
VOLUME
["/data"]
WORKDIR
/data
WORKDIR
/data
...
@@ -37,3 +39,5 @@ WORKDIR /data
...
@@ -37,3 +39,5 @@ WORKDIR /data
EXPOSE
6379
EXPOSE
6379
ENTRYPOINT
["/usr/bin/entrypoint.sh"]
ENTRYPOINT
["/usr/bin/entrypoint.sh"]
USER
redis
docker-compose.yaml
View file @
0c10fdef
...
@@ -11,7 +11,7 @@ services:
...
@@ -11,7 +11,7 @@ services:
SETUP_MODE
:
cluster
SETUP_MODE
:
cluster
SERVER_MODE
:
master
SERVER_MODE
:
master
healthcheck
:
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
redis-cli
-a
${REDIS_PASSWORD}
ping
"
]
test
:
[
"
CMD-SHELL"
,
"
/bin/bash
/usr/bin/healthcheck.sh
"
]
redis-master-2
:
redis-master-2
:
image
:
opstree/redis:1.0
image
:
opstree/redis:1.0
...
@@ -24,7 +24,7 @@ services:
...
@@ -24,7 +24,7 @@ services:
SETUP_MODE
:
cluster
SETUP_MODE
:
cluster
SERVER_MODE
:
master
SERVER_MODE
:
master
healthcheck
:
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
redis-cli
-a
${REDIS_PASSWORD}
ping
"
]
test
:
[
"
CMD-SHELL"
,
"
/bin/bash
/usr/bin/healthcheck.sh
"
]
redis-master-3
:
redis-master-3
:
image
:
opstree/redis:1.0
image
:
opstree/redis:1.0
...
@@ -38,7 +38,7 @@ services:
...
@@ -38,7 +38,7 @@ services:
SERVER_MODE
:
master
SERVER_MODE
:
master
MASTER_LIST
:
"
10.5.0.2:6379
10.5.0.3:6379
10.5.0.4:6379"
MASTER_LIST
:
"
10.5.0.2:6379
10.5.0.3:6379
10.5.0.4:6379"
healthcheck
:
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
redis-cli
-a
${REDIS_PASSWORD}
ping
"
]
test
:
[
"
CMD-SHELL"
,
"
/bin/bash
/usr/bin/healthcheck.sh
"
]
redis-slave-1
:
redis-slave-1
:
image
:
opstree/redis:1.0
image
:
opstree/redis:1.0
...
@@ -53,7 +53,7 @@ services:
...
@@ -53,7 +53,7 @@ services:
SLAVE_IP
:
"
10.5.0.5:6379"
SLAVE_IP
:
"
10.5.0.5:6379"
MASTER_IP
:
"
10.5.0.2:6379"
MASTER_IP
:
"
10.5.0.2:6379"
healthcheck
:
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
redis-cli
-a
${REDIS_PASSWORD}
ping
"
]
test
:
[
"
CMD-SHELL"
,
"
/bin/bash
/usr/bin/healthcheck.sh
"
]
redis-slave-2
:
redis-slave-2
:
image
:
opstree/redis:1.0
image
:
opstree/redis:1.0
...
@@ -68,7 +68,7 @@ services:
...
@@ -68,7 +68,7 @@ services:
SLAVE_IP
:
"
10.5.0.6:6379"
SLAVE_IP
:
"
10.5.0.6:6379"
MASTER_IP
:
"
10.5.0.3:6379"
MASTER_IP
:
"
10.5.0.3:6379"
healthcheck
:
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
redis-cli
-a
${REDIS_PASSWORD}
ping
"
]
test
:
[
"
CMD-SHELL"
,
"
/bin/bash
/usr/bin/healthcheck.sh
"
]
redis-slave-3
:
redis-slave-3
:
image
:
opstree/redis:1.0
image
:
opstree/redis:1.0
...
@@ -83,7 +83,7 @@ services:
...
@@ -83,7 +83,7 @@ services:
SLAVE_IP
:
"
10.5.0.7:6379"
SLAVE_IP
:
"
10.5.0.7:6379"
MASTER_IP
:
"
10.5.0.4:6379"
MASTER_IP
:
"
10.5.0.4:6379"
healthcheck
:
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
redis-cli
-a
${REDIS_PASSWORD}
ping
"
]
test
:
[
"
CMD-SHELL"
,
"
/bin/bash
/usr/bin/healthcheck.sh
"
]
networks
:
networks
:
redis
:
redis
:
...
...
healthcheck.sh
0 → 100755
View file @
0c10fdef
#!/bin/bash
check_redis_health
()
{
if
[[
-z
"
${
REDIS_PASSWORD
}
"
]]
;
then
redis-cli ping
else
redis-cli
-a
${
REDIS_PASSWORD
}
ping
fi
}
check_redis_health
redis.conf
100644 → 100755
View file @
0c10fdef
File mode changed from 100644 to 100755
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment