Added redis service

This commit is contained in:
Viswamedha Nalabotu 2026-01-18 15:09:54 +00:00
parent 05c9f95398
commit 429247cd7d

View file

@ -45,15 +45,28 @@ services:
environment: environment:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - fyp_postgres_data:/var/lib/postgresql/data
ports: ports:
- '0.0.0.0:5432:5432' - '0.0.0.0:5432:5432'
healthcheck: healthcheck:
test: ['CMD-SHELL', "pg_isready -h 127.0.0.1 -p 5432 -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] test: ['CMD-SHELL', 'pg_isready -h 127.0.0.1 -p 5432 -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 3s
retries: 5
fyp-redis-dev:
container_name: fyp-redis-dev
image: redis:7-alpine
ports:
- '0.0.0.0:6379:6379'
volumes:
- fyp_redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s interval: 5s
timeout: 3s timeout: 3s
retries: 5 retries: 5
volumes: volumes:
postgres_data: fyp_postgres_data:
fyp_redis_data: