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
966c9f33
Commit
966c9f33
authored
Jan 04, 2023
by
Shubham Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Image build for the Sentinel Support
parent
609751ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
0 deletions
+90
-0
Dockerfile.sentinel
Dockerfile.sentinel
+49
-0
entrypoint-sentinel.sh
entrypoint-sentinel.sh
+24
-0
sentine.conf
sentine.conf
+17
-0
No files found.
Dockerfile.sentinel
0 → 100644
View file @
966c9f33
FROM alpine:3.15 as builder
LABEL VERSION=1.0 \
ARCH=AMD64 \
DESCRIPTION="A production grade performance tuned redis docker image created by Opstree Solutions"
ARG REDIS_DOWNLOAD_URL="http://download.redis.io/"
ARG REDIS_VERSION="stable"
RUN apk add --no-cache su-exec tzdata make curl build-base linux-headers bash openssl-dev
RUN curl -fL -Lo /tmp/redis-${REDIS_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${REDIS_VERSION}.tar.gz && \
cd /tmp && \
tar xvzf redis-${REDIS_VERSION}.tar.gz && \
cd redis-${REDIS_VERSION} && \
make && \
make install BUILD_TLS=yes
FROM alpine:3.15
LABEL VERSION=1.0 \
ARCH=AMD64 \
DESCRIPTION="A production grade performance tuned redis docker image created by Opstree Solutions"
COPY --from=builder /usr/local/bin/redis-cli /usr/local/bin/redis-cli
COPY --from=builder /usr/local/bin/redis-sentinel /usr/local/bin/redis-sentinel
RUN addgroup -S -g 1000 redis && adduser -S -G redis -u 1000 redis && \
apk add --no-cache bash
COPY sentinel.conf /etc/redis/sentinel.conf
COPY entrypoint-sentinel.sh /usr/bin/entrypoint-sentinel.sh
COPY healthcheck.sh /usr/bin/healthcheck.sh
RUN chown -R redis:redis /etc/redis
VOLUME ["/sentinel-data"]
WORKDIR /data
EXPOSE 26379
USER 1000
ENTRYPOINT ["/usr/bin/entrypoint-sentinel.sh"]
entrypoint-sentinel.sh
0 → 100644
View file @
966c9f33
#!/bin/bash
EXTERNAL_CONFIG_FILE
=
${
EXTERNAL_CONFIG_FILE
:-
"/etc/redis/external.conf.d/redis-sentinel-additional.conf"
}
external_config
()
{
echo
"include
${
EXTERNAL_CONFIG_FILE
}
"
>>
/etc/redis/sentinel.conf
}
start_sentinel
()
{
echo
"Starting redis sentinel service in standalone mode....."
redis-sentinel /etc/redis/sentinel.conf
}
main_function
()
{
if
[[
-f
"
${
EXTERNAL_CONFIG_FILE
}
"
]]
;
then
external_config
fi
start_sentinel
}
main_function
\ No newline at end of file
sentine.conf
0 → 100644
View file @
966c9f33
protected
-
mode
no
port
26379
daemonize
no
pidfile
/
var
/
run
/
redis
-
sentinel
.
pid
logfile
""
dir
/
tmp
acllog
-
max
-
len
128
# sentinel monitor mymaster 127.0.0.1 6379 2
# sentinel down-after-milliseconds mymaster 30000
# sentinel parallel-syncs mymaster 1
# sentinel failover-timeout mymaster 180000
sentinel
deny
-
scripts
-
reconfig
yes
SENTINEL
resolve
-
hostnames
no
SENTINEL
announce
-
hostnames
no
# SENTINEL master-reboot-down-after-period mymaster 0
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