feat: Dockerize web application by adding Dockerfile, .dockerignore, and configuring next.config for standalone output and image optimization.

This commit is contained in:
pradeepkumar
2025-12-24 06:39:16 +05:30
parent 099622dc88
commit fb57d1b8a4
3 changed files with 171 additions and 0 deletions

47
docker-compose.yml Normal file
View File

@@ -0,0 +1,47 @@
# ===========================================
# 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: