This commit is contained in:
Piotr Biernat 2023-03-20 17:21:18 +01:00
parent 603436f481
commit 2c987fe885
2 changed files with 22 additions and 35 deletions

View File

@ -7,7 +7,7 @@ LABEL dev.egommerce.image.version="1.0"
COPY ./api-cache/etc/redis.conf /etc/redis.conf COPY ./api-cache/etc/redis.conf /etc/redis.conf
EXPOSE 8765 EXPOSE 6379
# USER redis # USER redis
CMD ["redis-server", "/etc/redis.conf"] CMD ["redis-server", "/etc/redis.conf"]

View File

@ -84,7 +84,7 @@
# You will also need to set a password unless you explicitly disable protected # You will also need to set a password unless you explicitly disable protected
# mode. # mode.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind 127.0.0.1 -::1 bind *
# By default, outgoing connections (from replica to master, from Sentinel to # By default, outgoing connections (from replica to master, from Sentinel to
# instances, cluster bus, etc.) are not bound to a specific local address. In # instances, cluster bus, etc.) are not bound to a specific local address. In
@ -409,11 +409,6 @@ set-proc-title yes
# #
proc-title-template "{title} {listen-addr} {server-mode}" proc-title-template "{title} {listen-addr} {server-mode}"
# Set the local environment which is used for string comparison operations, and
# also affect the performance of Lua scripts. Empty String indicates the locale
# is derived from the environment variables.
locale-collate ""
################################ SNAPSHOTTING ################################ ################################ SNAPSHOTTING ################################
# Save the DB to disk. # Save the DB to disk.
@ -629,10 +624,11 @@ repl-diskless-sync-delay 5
repl-diskless-sync-max-replicas 0 repl-diskless-sync-max-replicas 0
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# WARNING: Since in this setup the replica does not immediately store an RDB on # WARNING: RDB diskless load is experimental. Since in this setup the replica
# disk, it may cause data loss during failovers. RDB diskless load + Redis # does not immediately store an RDB on disk, it may cause data loss during
# modules not handling I/O reads may cause Redis to abort in case of I/O errors # failovers. RDB diskless load + Redis modules not handling I/O reads may also
# during the initial synchronization stage with the master. # cause Redis to abort in case of I/O errors during the initial synchronization
# stage with the master. Use only if you know what you are doing.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# #
# Replica can load the RDB it reads from the replication link directly from the # Replica can load the RDB it reads from the replication link directly from the
@ -642,22 +638,19 @@ repl-diskless-sync-max-replicas 0
# In many cases the disk is slower than the network, and storing and loading # In many cases the disk is slower than the network, and storing and loading
# the RDB file may increase replication time (and even increase the master's # the RDB file may increase replication time (and even increase the master's
# Copy on Write memory and replica buffers). # Copy on Write memory and replica buffers).
# However, when parsing the RDB file directly from the socket, in order to avoid # However, parsing the RDB file directly from the socket may mean that we have
# data loss it's only safe to flush the current dataset when the new dataset is # to flush the contents of the current database before the full rdb was
# fully loaded in memory, resulting in higher memory usage. # received. For this reason we have the following options:
# For this reason we have the following options:
# #
# "disabled" - Don't use diskless load (store the rdb file to the disk first) # "disabled" - Don't use diskless load (store the rdb file to the disk first)
# "on-empty-db" - Use diskless load only when it is completely safe.
# "swapdb" - Keep current db contents in RAM while parsing the data directly # "swapdb" - Keep current db contents in RAM while parsing the data directly
# from the socket. Replicas in this mode can keep serving current # from the socket. Replicas in this mode can keep serving current
# dataset while replication is in progress, except for cases where # data set while replication is in progress, except for cases where
# they can't recognize master as having a data set from same # they can't recognize master as having a data set from same
# replication history. # replication history.
# Note that this requires sufficient memory, if you don't have it, # Note that this requires sufficient memory, if you don't have it,
# you risk an OOM kill. # you risk an OOM kill.
# "on-empty-db" - Use diskless load only when current dataset is empty. This is
# safer and avoid having old and new dataset loaded side by side
# during replication.
repl-diskless-load disabled repl-diskless-load disabled
# Master send PINGs to its replicas in a predefined interval. It's possible to # Master send PINGs to its replicas in a predefined interval. It's possible to
@ -942,9 +935,9 @@ replica-priority 100
# "nopass" status. After "resetpass" the user has no associated # "nopass" status. After "resetpass" the user has no associated
# passwords and there is no way to authenticate without adding # passwords and there is no way to authenticate without adding
# some password (or setting it as "nopass" later). # some password (or setting it as "nopass" later).
# reset Performs the following actions: resetpass, resetkeys, resetchannels, # reset Performs the following actions: resetpass, resetkeys, off,
# allchannels (if acl-pubsub-default is set), off, clearselectors, -@all. # -@all. The user returns to the same state it has immediately
# The user returns to the same state it has immediately after its creation. # after its creation.
# (<options>) Create a new selector with the options specified within the # (<options>) Create a new selector with the options specified within the
# parentheses and attach it to the user. Each option should be # parentheses and attach it to the user. Each option should be
# space separated. The first character must be ( and the last # space separated. The first character must be ( and the last
@ -1782,9 +1775,9 @@ aof-timestamp-enabled no
# published in the header of the bus packets so that other nodes will be able to # published in the header of the bus packets so that other nodes will be able to
# correctly map the address of the node publishing the information. # correctly map the address of the node publishing the information.
# #
# If tls-cluster is set to yes and cluster-announce-tls-port is omitted or set # If cluster-tls is set to yes and cluster-announce-tls-port is omitted or set
# to zero, then cluster-announce-port refers to the TLS port. Note also that # to zero, then cluster-announce-port refers to the TLS port. Note also that
# cluster-announce-tls-port has no effect if tls-cluster is set to no. # cluster-announce-tls-port has no effect if cluster-tls is set to no.
# #
# If the above options are not used, the normal Redis Cluster auto-detection # If the above options are not used, the normal Redis Cluster auto-detection
# will be used instead. # will be used instead.
@ -1951,20 +1944,13 @@ list-max-listpack-size -2
# etc. # etc.
list-compress-depth 0 list-compress-depth 0
# Sets have a special encoding when a set is composed # Sets have a special encoding in just one case: when a set is composed
# of just strings that happen to be integers in radix 10 in the range # of just strings that happen to be integers in radix 10 in the range
# of 64 bit signed integers. # of 64 bit signed integers.
# The following configuration setting sets the limit in the size of the # The following configuration setting sets the limit in the size of the
# set in order to use this special memory saving encoding. # set in order to use this special memory saving encoding.
set-max-intset-entries 512 set-max-intset-entries 512
# Sets containing non-integer values are also encoded using a memory efficient
# data structure when they have a small number of entries, and the biggest entry
# does not exceed a given threshold. These thresholds can be configured using
# the following directives.
set-max-listpack-entries 128
set-max-listpack-value 64
# Similarly to hashes and lists, sorted sets are also specially encoded in # Similarly to hashes and lists, sorted sets are also specially encoded in
# order to save a lot of space. This encoding is only used when the length and # order to save a lot of space. This encoding is only used when the length and
# elements of a sorted set are below the following limits: # elements of a sorted set are below the following limits:
@ -2181,10 +2167,11 @@ rdb-save-incremental-fsync yes
# to accumulate hits. # to accumulate hits.
# #
# The counter decay time is the time, in minutes, that must elapse in order # The counter decay time is the time, in minutes, that must elapse in order
# for the key counter to be decremented. # for the key counter to be divided by two (or decremented if it has a value
# less <= 10).
# #
# The default value for the lfu-decay-time is 1. A special value of 0 means we # The default value for the lfu-decay-time is 1. A special value of 0 means to
# will never decay the counter. # decay the counter every time it happens to be scanned.
# #
# lfu-log-factor 10 # lfu-log-factor 10
# lfu-decay-time 1 # lfu-decay-time 1