Add redis cache for gitea
This commit is contained in:
parent
cc847a069c
commit
2a8f715eca
3 changed files with 21 additions and 5 deletions
|
@ -11,6 +11,7 @@ services:
|
|||
- 3022:3022
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
volumes:
|
||||
- "{{ app_data_dir }}/gitea/app.ini:/data/gitea/conf/app.ini"
|
||||
- "{{ app_data_dir }}/gitea/:/data"
|
||||
|
@ -31,3 +32,9 @@ services:
|
|||
environment:
|
||||
- POSTGRES_PASSWORD=gitea
|
||||
- POSTGRES_USER=gitea
|
||||
|
||||
redis:
|
||||
image: redis:6-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /mnt/tank/dbs/redis/gitea/:/data
|
||||
|
|
|
@ -53,8 +53,8 @@ AVATAR_UPLOAD_PATH = /data/gitea/avatars
|
|||
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars
|
||||
|
||||
[session]
|
||||
PROVIDER_CONFIG = /data/gitea/sessions
|
||||
PROVIDER = file
|
||||
PROVIDER_CONFIG = {{ redis_url }}
|
||||
PROVIDER = redis
|
||||
COOKIE_NAME = session
|
||||
COOKIE_SECURE = true
|
||||
|
||||
|
@ -63,8 +63,9 @@ MODE = console
|
|||
LEVEL = info
|
||||
|
||||
[cache]
|
||||
ADAPTER = memory
|
||||
INTERVAL = 60
|
||||
ADAPTER = redis
|
||||
HOST = {{ redis_url }}
|
||||
ITEM_TTL = 168h # 1 week
|
||||
|
||||
[cron]
|
||||
RUN_AT_START = true
|
||||
|
@ -86,8 +87,14 @@ AUTHOR = {{ name }}
|
|||
DESCRIPTION = Git with a cup of orange juice
|
||||
|
||||
[indexer]
|
||||
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
|
||||
ISSUE_INDEXER_TYPE = db
|
||||
ISSUE_INDEXER_QUEUE_TYPE = redis
|
||||
ISSUE_INDEXER_QUEUE_CONN_STR = {{ redis_url }}
|
||||
|
||||
[other]
|
||||
SHOW_FOOTER_VERSION = false
|
||||
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false
|
||||
|
||||
[queue]
|
||||
TYPE = redis
|
||||
CONN_STR = {{ redis_url }}
|
||||
|
|
|
@ -35,3 +35,5 @@ gitea_jwt_secret: !vault |
|
|||
3535646333646563610a323765613034383662323333336230363766313130643838623039353432
|
||||
34633332343962393438613837376632303038343762626334363939646466313138626362316334
|
||||
6636613666636338616230333839316466613365396634326562
|
||||
|
||||
redis_url: redis://redis:6379
|
||||
|
|
Loading…
Reference in a new issue