48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
# ===========================================
|
|
# Backend Docker Compose (Development)
|
|
# ===========================================
|
|
|
|
services:
|
|
# ===========================================
|
|
# PostgreSQL Database
|
|
# ===========================================
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: re-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: real_estate
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ===========================================
|
|
# Redis Cache
|
|
# ===========================================
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: re-redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|