Add a redis cache to gitea
This commit is contained in:
parent
e93dbf2ecf
commit
c0c396f008
2 changed files with 19 additions and 3 deletions
|
@ -43,7 +43,8 @@ CHARSET = utf8
|
|||
LOG_SQL = false
|
||||
|
||||
[indexer]
|
||||
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
|
||||
ISSUE_INDEXER_QUEUE_TYPE = redis
|
||||
ISSUE_INDEXER_QUEUE_CONN_STR = addr=redis:6379
|
||||
|
||||
[session]
|
||||
PROVIDER_CONFIG = /data/gitea/sessions
|
||||
|
@ -94,5 +95,14 @@ ENABLE_OPENID_SIGNIN = false
|
|||
ENABLE_OPENID_SIGNUP = false
|
||||
|
||||
[cache]
|
||||
ADAPTER = memory
|
||||
INTERVAL = 60
|
||||
ADAPTER = redis
|
||||
HOST = addr=redis:6379
|
||||
ITEM_TTL = 168h
|
||||
|
||||
[queue]
|
||||
TYPE = redis
|
||||
CONN_STR = addr=redis:6379
|
||||
|
||||
[queue.task]
|
||||
TYPE = redis
|
||||
CONN_STR = addr=redis:6379
|
||||
|
|
|
@ -21,6 +21,12 @@ services:
|
|||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
redis:
|
||||
image: redis:5-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
|
||||
db:
|
||||
image: postgres:12-alpine
|
||||
restart: unless-stopped
|
||||
|
|
Loading…
Reference in a new issue