version: '3.8' services: # PostgreSQL Database db: image: postgres:16-alpine container_name: invoice_db environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres123 POSTGRES_DB: invoice_db ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 # NestJS Application app: build: . container_name: invoice_ocr_app depends_on: db: condition: service_healthy environment: DATABASE_URL: postgresql://postgres:postgres123@db:5432/invoice_db NODE_ENV: development PORT: 3000 ports: - "3000:3000" volumes: - ./src:/app/src - ./uploads:/app/uploads command: npm run start:dev volumes: postgres_data: