data-cleaning-openenv / docker-compose.new.yml
01ammu's picture
Sync from GitHub via hub-sync
fee2f22 verified
Raw History Blame Contribute Delete
1.9 kB
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: data_cleaning
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d data_cleaning"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379:6379"
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://admin:password@postgres:5432/data_cleaning
REDIS_URL: redis://redis:6379/0
ENVIRONMENT: development
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
volumes:
- ./uploads:/app/uploads
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/api/health || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
celery:
build:
context: ./backend
dockerfile: Dockerfile
command: celery -A backend.tasks worker --loglevel=info
environment:
DATABASE_URL: postgresql://admin:password@postgres:5432/data_cleaning
REDIS_URL: redis://redis:6379/0
ENVIRONMENT: development
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
backend:
condition: service_started
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
VITE_API_BASE_URL: http://backend:8000/api
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data: