Why docker-compose down deletes my redis Keys

I am using tyk open source gateway

version: ‘3.3’
services:
tyk-gateway:
image:
ports:
- 8080:8080
networks:
- tyk-api_tyk
volumes:
- ./tyk.standalone.conf:/opt/tyk-gateway/tyk.conf
- ./apps:/opt/tyk-gateway/apps
- ./middleware:/opt/tyk-gateway/middleware
- ./certs:/opt/tyk-gateway/certs
- ./policies:/opt/tyk-gateway/policies
environment:
- TYK_GW_SECRET=wally
- TYK_GW_PROXYDEFAULTTIMEOUT=120
depends_on:
- tyk-redis
tyk-redis:
image: redis:6.2.7-alpine
networks:
tyk-api_tyk:
aliases:
- redis
ports:
- 6379:6379

networks:
tyk-api_tyk:

I am configured in AWS EC2

In local, the keys are not removing when I make docker compose down and up

But In server, when I make compose down and up, the redis becomes null

Hi @Thangaraj_M,

Welcome to the community :star:

Looks like you haven’t configured a volume (persistence) for Redis in the docker-compose.yml. Please see a sample in tyk-pro-docker-demo.