aports/main/valkey/valkey.conf.patch

111 lines
4.0 KiB
Diff

We force "daemonize no" in init script, so daemonize and pidfile does not
have any effect in valkey.conf. It's init/rc system's job to daemonize
programs and handle pidfiles, if it needs it!
Applications often communicate with Redis via unix socket, so it's
convenient to have it enabled by default. It must be in a subdirectory that
is automatically created by the init script because valkey user has no
permission to create files in /run.
--- a/valkey.conf
+++ b/valkey.conf
@@ -53,6 +53,9 @@
# loadmodule /path/to/other_module.so
# loadmodule /path/to/args_module.so [arg [arg ...]]
+# Include module configuration files.
+include /etc/valkey/modules/*.conf
+
################################## NETWORK #####################################
# By default, if no "bind" configuration directive is specified, the server listens
@@ -163,9 +166,9 @@ tcp-backlog 511
# incoming connections. There is no default, so the server will not listen
# on a unix socket when not specified.
#
-# unixsocket /run/valkey.sock
-# unixsocketgroup wheel
-# unixsocketperm 700
+unixsocket /run/valkey/valkey.sock
+unixsocketgroup valkey
+unixsocketperm 770
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 0
@@ -196,6 +199,8 @@ tcp-keepalive 300
################################# TLS/SSL #####################################
+# Alpine: To use TLS, install package "valkey-tls".
+
# By default, TLS/SSL is disabled. To enable it, the "tls-port" configuration
# directive can be used to define TLS-listening ports. To enable TLS on the
# default port, use:
@@ -374,11 +379,6 @@ tcp-keepalive 300
################################# GENERAL #####################################
-# By default the server does not run as a daemon. Use 'yes' if you need it.
-# Note that the server will write a pid file in /var/run/valkey.pid when daemonized.
-# When the server is supervised by upstart or systemd, this parameter has no impact.
-daemonize no
-
# If you run the server from upstart or systemd, the server can interact with your
# supervision tree. Options:
# supervised no - no supervision interaction
@@ -397,20 +397,6 @@ daemonize no
#
# supervised auto
-# If a pid file is specified, the server writes it where specified at startup
-# and removes it at exit.
-#
-# When the server runs non daemonized, no pid file is created if none is
-# specified in the configuration. When the server is daemonized, the pid file
-# is used even if not specified, defaulting to "/var/run/valkey.pid".
-#
-# Creating a pid file is best effort: if the server is not able to create it
-# nothing bad happens, the server will start and run normally.
-#
-# Note that on modern Linux systems "/run/valkey.pid" is more conforming
-# and should be used instead.
-pidfile /var/run/valkey_6379.pid
-
# Specify the server verbosity level.
# This can be one of:
# debug (a lot of information, useful for development/testing)
@@ -440,14 +426,14 @@ loglevel notice
# Specify the log file name. Also the empty string can be used to force
# the server to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
-logfile ""
+# logfile /var/log/valkey.log
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
# and optionally update the other syslog parameters to suit your needs.
-# syslog-enabled no
+syslog-enabled yes
# Specify the syslog identity.
-# syslog-ident valkey
+syslog-ident valkey
# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
# syslog-facility local0
@@ -631,7 +617,7 @@ rdb-del-sync-files no
# Note that modifying 'dir' during runtime may have unexpected behavior,
# for example when a child process is running, related file operations may
# have unexpected effects.
-dir ./
+dir /var/lib/valkey
################################# REPLICATION #################################
@@ -2633,3 +2619,6 @@ jemalloc-bg-thread yes
# the empty string.
#
# availability-zone "zone-name"
+
+# Include configuration fragments.
+include /etc/valkey/valkey.d/*.conf