name: telegram-search services: pgvector: image: ghcr.io/tensorchord/pgvecto-rs:pg17-v0.4.0 environment: POSTGRES_USER: postgres POSTGRES_DATABASE: postgres POSTGRES_PASSWORD: '123456' volumes: - ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql - pgvector_data:/var/lib/postgresql/data healthcheck: test: [CMD-SHELL, pg_isready -d postgres -U postgres] interval: 10s timeout: 5s retries: 5 restart: unless-stopped app: build: context: . dockerfile: Dockerfile ports: - 3333:3333 depends_on: pgvector: condition: service_healthy volumes: - ./config:/app/config - app_data:/app/data restart: none environment: DATABASE_TYPE: postgres DATABASE_URL: 'postgresql://postgres:123456@pgvector:5432/postgres' healthcheck: test: [CMD-SHELL, 'curl -f http://localhost/health || exit 1'] interval: 30s timeout: 10s retries: 3 start_period: 40s volumes: pgvector_data: app_data: