Add Redis cache to Forgejo
This commit is contained in:
parent
67eb2227dd
commit
d36d3db10d
1 changed files with 20 additions and 3 deletions
|
|
@ -1,4 +1,13 @@
|
|||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
networks:
|
||||
- forgejo
|
||||
restart: unless-stopped
|
||||
|
||||
forgejo:
|
||||
image: codeberg.org/forgejo/forgejo:9
|
||||
environment:
|
||||
|
|
@ -9,15 +18,20 @@ services:
|
|||
FORGEJO__server__DISABLE_SSH: "false"
|
||||
FORGEJO__actions__ENABLED: "true"
|
||||
FORGEJO__service__ALLOW_ONLY_EXTERNAL_REGISTRATION: "true"
|
||||
FORGEJO__service__DISABLE_REGISTRATION: "false"
|
||||
FORGEJO__service__SHOW_REGISTRATION_BUTTON: "false"
|
||||
FORGEJO__service__DISABLE_REGISTRATION: "true"
|
||||
FORGEJO__service__REQUIRE_SIGNIN_VIEW: "false"
|
||||
FORGEJO__repository__DISABLE_PUBLIC_REPOS: "false"
|
||||
FORGEJO__database__DB_TYPE: sqlite3
|
||||
FORGEJO__cache__ADAPTER: redis
|
||||
FORGEJO__cache__HOST: redis:6379
|
||||
volumes:
|
||||
- forgejo_data:/data
|
||||
- ./robots.txt:/data/forgejo/public/robots.txt:ro
|
||||
ports:
|
||||
- "2222:22"
|
||||
networks:
|
||||
- proxy
|
||||
- forgejo
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
|
|
@ -26,13 +40,16 @@ services:
|
|||
- traefik.http.routers.forgejo.entrypoints=websecure
|
||||
- traefik.http.routers.forgejo.tls=true
|
||||
- traefik.http.routers.forgejo.tls.certresolver={{ traefik_certresolver }}
|
||||
- traefik.http.routers.forgejo.middlewares=security-headers@file,compress@file
|
||||
- traefik.http.routers.forgejo.middlewares=security-headers@file,compress@file,rate-limit@file
|
||||
- traefik.http.services.forgejo.loadbalancer.server.port=3000
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
|
||||
volumes:
|
||||
forgejo_data:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
forgejo:
|
||||
internal: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue