Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Merge branch 'caddy-v2'
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalan committed Jan 28, 2021
2 parents 607b931 + bdacbfc commit 30e7f5d
Showing 1 changed file with 34 additions and 32 deletions.
66 changes: 34 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,21 @@ You enable Redis storage with Caddy by setting the storage module used, for exam
```
{
//all value is optional, here is the default
storage redis {
host "127.0.0.1"
port 6379
address "127.0.0.1:6379" // no default, but is build from host+":"+port, if set, then host and port is ignored
password ""
db 1
key_prefix "caddytls"
value_prefix "caddy-storage-redis"
timeout 5
tls_enabled "false"
tls_insecure "true"
aes_key "redistls-01234567890-caddytls-32" // optional, but must have 32 length
}
// because the option are set using env, there are no need for additional option value
storage redis {
host "127.0.0.1"
port 6379
address "127.0.0.1:6379" // no default, but is build from host+":"+port, if set, then host and port is ignored
username ""
password ""
db 1
key_prefix "caddytls"
value_prefix "caddy-storage-redis"
timeout 5
tls_enabled "false"
tls_insecure "true"
aes_key "redistls-01234567890-caddytls-32" // optional, but must have 32 length
}
// because the option are set using env, there are no need for additional option value
}
:443 {
Expand All @@ -39,29 +40,30 @@ You enable Redis storage with Caddy by setting the storage module used, for exam
JSON example
```
{
"admin": {
"listen": "0.0.0.0:2019"
},
"storage": {
"address": "redis:6379",
"aes_key": "redistls-01234567890-caddytls-32",
"db": 1,
"host": "redis",
"key_prefix": "caddytls",
"module": "redis",
"password": "",
"port": "6379",
"timeout": 5,
"tls_enabled": false,
"tls_insecure": true,
"value_prefix": "caddy-storage-redis"
}
"admin": {
"listen": "0.0.0.0:2019"
},
"storage": {
"address": "redis:6379",
"aes_key": "redistls-01234567890-caddytls-32",
"db": 1,
"host": "redis",
"key_prefix": "caddytls",
"module": "redis",
"password": "",
"port": "6379",
"timeout": 5,
"tls_enabled": false,
"tls_insecure": true,
"value_prefix": "caddy-storage-redis"
}
}
```
There are additional environment variable for this plugin:
- `CADDY_CLUSTERING_REDIS_HOST` defines Redis Host, default is `127.0.0.1`
- `CADDY_CLUSTERING_REDIS_PORT` defines Redis Port, default is 6379
- `CADDY_CLUSTERING_REDIS_PASSWORD` defines Redis Password, default is empty
- `CADDY_CLUSTERING_REDIS_USERNAME` defines Redis username, default is empty
- `CADDY_CLUSTERING_REDIS_PASSWORD` defines Redis password, default is empty
- `CADDY_CLUSTERING_REDIS_DB` defines Redis DB, default is 0
- `CADDY_CLUSTERING_REDIS_TIMEOUT` defines Redis Dial,Read,Write timeout, default is set to 5 for 5 seconds
- `CADDY_CLUSTERING_REDIS_AESKEY` defines your personal AES key to use when encrypting data. It needs to be 32 characters long.
Expand Down

0 comments on commit 30e7f5d

Please sign in to comment.