Add cachijng
This commit is contained in:
parent
89d18e379a
commit
36cfd050b5
@ -39,8 +39,15 @@ services:
|
|||||||
- USE_RECAPTCHA=False
|
- USE_RECAPTCHA=False
|
||||||
- DJANGO_CLEAR_STATIC_FIRST=False
|
- DJANGO_CLEAR_STATIC_FIRST=False
|
||||||
- FROM_EMAIL='wger Workout Manager <wger@shoebottom.com>'
|
- FROM_EMAIL='wger Workout Manager <wger@shoebottom.com>'
|
||||||
|
- DJANGO_CACHE_BACKEND=django_redis.cache.RedisCache
|
||||||
|
- DJANGO_CACHE_LOCATION=redis://cache:6379/1
|
||||||
|
- DJANGO_CACHE_TIMEOUT=1296000 # in seconds - 60*60*24*15, 15 Days
|
||||||
|
- DJANGO_CACHE_CLIENT_CLASS=django_redis.client.DefaultClient
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
cache:
|
||||||
|
condition: service_healthy
|
||||||
env_file:
|
env_file:
|
||||||
- ../stack.env
|
- ../stack.env
|
||||||
volumes:
|
volumes:
|
||||||
@ -93,3 +100,17 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
start_period: 30s
|
start_period: 30s
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
cache:
|
||||||
|
image: redis
|
||||||
|
expose:
|
||||||
|
- 6379
|
||||||
|
volumes:
|
||||||
|
- /docker/appdata/wger/cache:/data
|
||||||
|
healthcheck:
|
||||||
|
test: redis-cli ping
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 30s
|
||||||
|
restart: unless-stopped
|
||||||
|
Loading…
Reference in New Issue
Block a user