CACHEPOT_* environment variable, making it just as easy to configure whether you are running the binary directly, in a container, or through a process manager.
Full startup example
The command below starts Cache-Pot with every persistence and security option explicitly set. In practice you only need to include the flags you want to change from their defaults.Configuration reference
Using environment variables
Every flag has aCACHEPOT_ environment variable equivalent. Set the variable before starting the process and the server picks it up automatically.
Environment variables accept the same values as their flag equivalents. Duration variables accept Go duration strings (
60s, 5m, 1h) or a bare integer number of seconds.
When both a flag and its environment variable are supplied, the flag takes precedence over the environment variable.
Authentication
When--auth is set, every client must issue the AUTH command before Cache-Pot will accept any other command. You can pass the password directly to redis-cli with the -a flag:
TLS
Set--tls-cert and --tls-key together to serve the RESP2 port over TLS (minimum TLS 1.2). Both flags must be present, or the server refuses to start:
redis-cli --tls --cacert cert.pem, or cache-pot cli --tls --tls-cacert cert.pem.
TLS is off by default and independent of
--auth — you can combine both, or use either alone.