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
0a838d92
Commit
0a838d92
authored
Jan 04, 2023
by
Shubham Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
env variable can be set
parent
87d0adc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
Dockerfile.sentinel
Dockerfile.sentinel
+1
-1
entrypoint-sentinel.sh
entrypoint-sentinel.sh
+22
-0
No files found.
Dockerfile.sentinel
View file @
0a838d92
...
@@ -40,7 +40,7 @@ RUN chown -R redis:redis /etc/redis
...
@@ -40,7 +40,7 @@ RUN chown -R redis:redis /etc/redis
VOLUME ["/sentinel-data"]
VOLUME ["/sentinel-data"]
WORKDIR /data
WORKDIR /
sentinel-
data
EXPOSE 26379
EXPOSE 26379
...
...
entrypoint-sentinel.sh
View file @
0a838d92
#!/bin/bash
#!/bin/bash
#Redis Configuration needed
PORT
=
${
PORT
:-
6379
}
IP
=
${
IP
:-
0
.0.0.0
}
QUORUM
=
${
QUORUM
:-
2
}
#Sentinel Config
EXTERNAL_CONFIG_FILE
=
${
EXTERNAL_CONFIG_FILE
:-
"/etc/redis/external.conf.d/redis-sentinel-additional.conf"
}
EXTERNAL_CONFIG_FILE
=
${
EXTERNAL_CONFIG_FILE
:-
"/etc/redis/external.conf.d/redis-sentinel-additional.conf"
}
DOWN_AFTER_MILLISECONDS
=
${
DOWN_AFTER_MILLISECONDS
:-
30000
}
PARALLEL_SYNCS
=
${
PARALLEL_SYNCS
:-
1
}
FAILOVER_TIMEOUT
=
${
FAILOVER_TIMEOUT
:-
180000
}
sentinel_mode_setup
(){
{
echo
"sentinel monitor
${
MASTER_GROUP_NAME
}
${
IP
}
${
PORT
}
${
QUORUM
}
"
echo
"sentinel down-after-milliseconds
${
MASTER_GROUP_NAME
}
${
DOWN_AFTER_MILLISECONDS
}
"
echo
"sentinel parallel-syncs
${
MASTER_GROUP_NAME
}
${
PARALLEL_SYNCS
}
"
echo
"sentinel failover-timeout
${
MASTER_GROUP_NAME
}
${
FAILOVER_TIMEOUT
}
"
}>>
/etc/redis/sentinel.conf
}
external_config
()
{
external_config
()
{
echo
"include
${
EXTERNAL_CONFIG_FILE
}
"
>>
/etc/redis/sentinel.conf
echo
"include
${
EXTERNAL_CONFIG_FILE
}
"
>>
/etc/redis/sentinel.conf
...
@@ -15,6 +35,8 @@ start_sentinel() {
...
@@ -15,6 +35,8 @@ start_sentinel() {
main_function
()
{
main_function
()
{
sentinel_mode_setup
if
[[
-f
"
${
EXTERNAL_CONFIG_FILE
}
"
]]
;
then
if
[[
-f
"
${
EXTERNAL_CONFIG_FILE
}
"
]]
;
then
external_config
external_config
fi
fi
...
...
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