version: '3.8' services: backend: build: context: ./backend dockerfile: Dockerfile ports: - "8000:8000" environment: - DATABASE_URL=postgresql://postgres:postgres@db:5432/propertyflow - REDIS_URL=redis://redis:6379/0 - SECRET_KEY=debug_challenge_secret depends_on: - db - redis volumes: - ./backend:/app frontend: build: context: ./frontend dockerfile: Dockerfile ports: - "3000:80" # Mapping internal 80 (nginx) to 3000 environment: - VITE_API_URL=http://localhost:8000 depends_on: - backend db: image: postgres:15-alpine environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=propertyflow ports: - "5433:5432" volumes: # Initialize DB with schema and seeds - ./database/schema.sql:/docker-entrypoint-initdb.d/1-schema.sql - ./database/seed.sql:/docker-entrypoint-initdb.d/2-seed.sql # Ephemeral storage for easy reset (comment out to persist) # - pgdata:/var/lib/postgresql/data redis: image: redis:alpine ports: - "6380:6379" # Maps internal 6379 to host 6380 to avoid local conflicts volumes: pgdata: