File size: 1,126 Bytes
cc2c33e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
services:
  postgres:
    image: pgvector/pgvector:pg17
    container_name: braincore-pgvector
    environment:
      POSTGRES_USER: braincore
      POSTGRES_PASSWORD: braincore_dev_pass
      POSTGRES_DB: braincore_memory
    ports:
      - "5432:5432"
    volumes:
      - pgdata:/var/lib/postgresql/data
      - ./sql/001_init.sql:/docker-entrypoint-initdb.d/001_init.sql:ro
      - ./sql/002_seed.sql:/docker-entrypoint-initdb.d/002_seed.sql:ro
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U braincore -d braincore_memory"]
      interval: 5s
      timeout: 5s
      retries: 5
    networks:
      - braincore

  # Optional: run the FastAPI app in Docker too.
  # Uncomment after building the image or use local uvicorn for dev.
  # api:
  #   build: .
  #   container_name: braincore-api
  #   ports:
  #     - "8000:8000"
  #   environment:
  #     - DATABASE_URL=postgresql://braincore:braincore_dev_pass@postgres:5432/braincore_memory
  #   depends_on:
  #     postgres:
  #       condition: service_healthy
  #   networks:
  #     - braincore

volumes:
  pgdata:

networks:
  braincore:
    driver: bridge