services: postgres: image: postgres:16-alpine container_name: oem_postgres environment: POSTGRES_USER: crawler_user POSTGRES_PASSWORD: crawler_password POSTGRES_DB: oem_stock_db ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./schema.sql:/docker-entrypoint-initdb.d/init_schema.sql:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U crawler_user -d oem_stock_db"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped crawler: build: context: . dockerfile: Dockerfile container_name: oem_crawler depends_on: postgres: condition: service_healthy environment: DATABASE_URL: postgresql+psycopg://crawler_user:crawler_password@postgres:5432/oem_stock_db DEFAULT_MARKET: DE LOG_LEVEL: INFO DEFAULT_DELAY_SECONDS: 1.0 ENABLE_RAW_EXTRACTION: "true" RAW_STORAGE_DIR: "/data/raw" volumes: - ./data/raw:/data/raw command: ["--brand", "bmw", "--limit", "50"] restart: "no" volumes: postgres_data: driver: local