docker-compose (dev): persist redis data

This commit is contained in:
Mohamed Sohail 2022-12-01 09:50:50 +00:00
parent 742095c71f
commit dbfe3e95c8
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D

View File

@ -3,7 +3,9 @@ services:
redis: redis:
image: redis:6-alpine image: redis:6-alpine
restart: unless-stopped restart: unless-stopped
command: redis-server --loglevel warning command: redis-server --save 60 1 --loglevel warning
volumes:
- cic-custodial-redis:/data
ports: ports:
- '6379:6379' - '6379:6379'
healthcheck: healthcheck:
@ -20,7 +22,7 @@ services:
- POSTGRES_USER=postgres - POSTGRES_USER=postgres
- POSTGRES_DB=cic_custodial - POSTGRES_DB=cic_custodial
volumes: volumes:
- cic-custodial:/var/lib/postgresql/data - cic-custodial-pg:/var/lib/postgresql/data
ports: ports:
- '5432:5432' - '5432:5432'
healthcheck: healthcheck:
@ -49,5 +51,7 @@ services:
ports: ports:
- '5000:5000' - '5000:5000'
volumes: volumes:
cic-custodial: cic-custodial-pg:
driver: local driver: local
cic-custodial-redis:
driver: local