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
7262250b
Commit
7262250b
authored
Mar 16, 2020
by
iamabhishek-dubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added entrypoint.sh to support cluster and standalone
parent
4eb86fc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
Dockerfile
Dockerfile
+2
-4
entrypoint.sh
entrypoint.sh
+14
-0
redis.conf
redis.conf
+0
-8
No files found.
Dockerfile
View file @
7262250b
...
...
@@ -10,10 +10,6 @@ ARG REDIS_DOWNLOAD_URL="http://download.redis.io/"
ARG
REDIS_VERSION="stable"
COPY
redis.conf /etc/redis/redis.conf
COPY
entrypoint.sh /usr/bin/entrypoint.sh
RUN
addgroup
-S
-g
1000 redis
&&
adduser
-S
-G
redis
-u
999 redis
&&
\
apk add
--no-cache
su-exec tzdata make curl build-base linux-headers
...
...
@@ -27,6 +23,8 @@ RUN curl -fL -Lo /tmp/redis-${REDIS_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-
cp
-f
*
.conf /etc/redis
&&
\
rm
-rf
/tmp/redis-
${
REDIS_VERSION
}*
COPY
entrypoint.sh /usr/bin/entrypoint.sh
VOLUME
["/data"]
WORKDIR
/data
...
...
entrypoint.sh
View file @
7262250b
...
...
@@ -2,6 +2,19 @@
set
-eu
generate_common_config
()
{
{
echo
"bind 0.0.0.0"
echo
protected-mode
yes
echo
tcp-backlog 511
echo timeout
0
echo
tcp-keepalive 300
echo
daemonize no
echo
supervised no
echo
pidfile /var/run/redis.pid
}
>
/etc/redis/redis.conf
}
set_redis_password
()
{
if
[
-z
"
${
REDIS_PASSWORD
}
"
]
;
then
echo
"Redis is running without password which is not recommended"
...
...
@@ -31,6 +44,7 @@ start_redis() {
}
main_function
()
{
generate_common_config
set_redis_password
redis_mode_setup
start_redis
...
...
redis.conf
deleted
100644 → 0
View file @
4eb86fc2
bind
0
.
0
.
0
.
0
protected
-
mode
yes
tcp
-
backlog
511
timeout
0
tcp
-
keepalive
300
daemonize
no
supervised
no
pidfile
/
var
/
run
/
redis
.
pid
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