42 lines
917 B
YAML
42 lines
917 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: smart-search-postgres
|
|
environment:
|
|
POSTGRES_DB: b2b_search
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
smart-search-service:
|
|
build: .
|
|
container_name: smart-search-service
|
|
ports:
|
|
- "9091:9091"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_NAME: b2b_search
|
|
DB_USER: postgres
|
|
DB_PASSWORD: password
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
|
PERPLEXITY_API_KEY: ${PERPLEXITY_API_KEY}
|
|
GRPC_PORT: 9091
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|