secure redis

pull/473/head
OscarSotoSanchez 2020-05-13 16:25:53 +02:00
parent 422c81397b
commit 1a0713ebbb
5 changed files with 40 additions and 3 deletions

View File

@ -36,6 +36,7 @@ services:
- SERVER_PORT=5443
- KMS_URIS=["ws://localhost:8888/kurento"]
- COTURN_REDIS_IP=127.0.0.1
- COTURN_REDIS_PASSWORD=${OPENVIDU_SECRET}
kms:
image: ${KMS_IMAGE:-kurento/kurento-media-server:6.13.2}
@ -52,9 +53,11 @@ services:
- GST_DEBUG=${KMS_DEBUG_LEVEL:-}
redis:
image: redis:5.0.7
image: openvidu/openvidu-redis:1.0.0
restart: always
network_mode: host
environment:
- REDIS_PASSWORD=${OPENVIDU_SECRET}
coturn:
image: openvidu/openvidu-coturn:1.0.0
@ -64,7 +67,7 @@ services:
- REDIS_IP=127.0.0.1
- TURN_LISTEN_PORT=3478
- DB_NAME=0
- DB_PASSWORD=turn
- DB_PASSWORD=${OPENVIDU_SECRET}
- MIN_PORT=57001
- MAX_PORT=65535

View File

@ -2,7 +2,7 @@
# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=v2.14.0
OPENVIDU_VERSION=master
fatal_error() {
printf "\n =======¡ERROR!======="

View File

@ -0,0 +1,7 @@
FROM redis:6.0.1-alpine
COPY ./entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/entrypoint.sh
CMD /usr/local/bin/entrypoint.sh

View File

@ -0,0 +1 @@
docker build --rm -t openvidu/openvidu-redis .

View File

@ -0,0 +1,26 @@
#!/bin/sh
[ -z "${REDIS_BINDING}" ] && REDIS_BINDING="127.0.0.1"
printf "\n"
printf "\n ======================================="
printf "\n = REDIS CONF ="
printf "\n ======================================="
printf "\n"
printf "\n REDIS_BINDING: %s" "${REDIS_BINDING}"
printf "\n REDIS_PASSWORD: %s" "${REDIS_PASSWORD}"
mkdir -p /usr/local/etc/redis
cat>/usr/local/etc/redis/redis.conf<<EOF
bind ${REDIS_BINDING}
requirepass ${REDIS_PASSWORD}
EOF
printf "\n"
printf "\n ======================================="
printf "\n = START REDIS ="
printf "\n ======================================="
printf "\n"
redis-server /usr/local/etc/redis/redis.conf