Правки конфига keydb

- перечитка старых данных при перезапуске
- попытка вырубить репликацию
This commit is contained in:
2025-07-10 11:15:41 +08:00
parent 70847623e8
commit 28f93bd9a6
3 changed files with 11 additions and 5 deletions

View File

@@ -21,8 +21,10 @@ services:
container_name: iptv-keydb
image: eqalpha/keydb:latest
user: ${KEYDB_UID}:${KEYDB_GID}
entrypoint: ["sh", "/entrypoint.sh"]
volumes:
- ./docker/keydb/keydb.conf:/etc/keydb/keydb.conf
- ./docker/keydb/entrypoint.sh:/entrypoint.sh
- ./docker/keydb/data/:/data:rw
- ./log/keydb:/var/log/keydb/:rw
ports:

View File

@@ -0,0 +1,4 @@
#!/bin/sh
trap 'echo "Received SIGTERM, saving KeyDB data..."; keydb-cli SAVE; echo "Data saved. Exiting."; exit 0' TERM
echo "[entrypoint] Starting KeyDB..."
exec keydb-server /etc/keydb/keydb.conf "$@"

View File

@@ -493,7 +493,7 @@ dir /data
# network partition replicas automatically try to reconnect to masters
# and resynchronize with them.
#
# replicaof <masterip> <masterport>
replicaof no one
# If the master is password protected (using the "requirepass" configuration
# directive below) it is possible to tell the replica to authenticate before
@@ -526,7 +526,7 @@ dir /data
# UNSUBSCRIBE, PSUBSCRIBE, PUNSUBSCRIBE, PUBLISH, PUBSUB, COMMAND, POST,
# HOST and LATENCY.
#
replica-serve-stale-data yes
replica-serve-stale-data no
# Active Replicas will allow read only data access while loading remote RDBs
# provided they are permitted to serve stale data. As an option you may also
@@ -585,7 +585,7 @@ replica-read-only yes
#
# With slow disks and fast (large bandwidth) networks, diskless replication
# works better.
repl-diskless-sync no
#repl-diskless-sync no
# When diskless replication is enabled, it is possible to configure the delay
# the server waits in order to spawn the child that transfers the RDB via socket
@@ -597,7 +597,7 @@ repl-diskless-sync no
#
# The delay is specified in seconds, and by default is 5 seconds. To disable
# it entirely just set it to 0 seconds and the transfer will start ASAP.
repl-diskless-sync-delay 5
#repl-diskless-sync-delay 5
# -----------------------------------------------------------------------------
# WARNING: RDB diskless load is experimental. Since in this setup the replica
@@ -1279,7 +1279,7 @@ disable-thp yes
#
# Please check http://redis.io/topics/persistence for more information.
appendonly no
appendonly yes
# The name of the append only file (default: "appendonly.aof")