2
0
mirror of https://github.com/boostorg/redis.git synced 2026-01-19 04:42:09 +00:00

Adds support for UNIX sockets (#272)

close #246
This commit is contained in:
Anarthal (Rubén Pérez)
2025-06-20 13:23:39 +02:00
committed by GitHub
parent 89a42dbf74
commit 7304d99bf6
20 changed files with 640 additions and 141 deletions

View File

@@ -1,16 +1,10 @@
services:
redis:
image: "redis:alpine"
command: [
"redis-server",
"--tls-port", "6380",
"--tls-cert-file", "/tls/server.crt",
"--tls-key-file", "/tls/server.key",
"--tls-ca-cert-file", "/tls/ca.crt",
"--tls-auth-clients", "no",
]
entrypoint: "/docker/entrypoint.sh"
volumes:
- ./tls:/tls
- ./docker:/docker
- /tmp/redis-socks:/tmp/redis-socks
ports:
- 6379:6379
- 6380:6380
@@ -22,3 +16,4 @@ services:
- BOOST_REDIS_TEST_SERVER=redis
volumes:
- ../:/boost-redis
- /tmp/redis-socks:/tmp/redis-socks

16
tools/docker/entrypoint.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
# The Redis container entrypoint. Runs the server with the required
# flags and makes the socket accessible
set -e
chmod 777 /tmp/redis-socks
redis-server \
--tls-port 6380 \
--tls-cert-file /docker/tls/server.crt \
--tls-key-file /docker/tls/server.key \
--tls-ca-cert-file /docker/tls/ca.crt \
--tls-auth-clients no \
--unixsocket /tmp/redis-socks/redis.sock \
--unixsocketperm 777