File size: 1,061 Bytes
2cb9dec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
abfb1fb
 
2cb9dec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: similarity-search-app
    ports:
      - "7860:7860"
    volumes:
      - ./src:/app/src  # Mount the local src directory for hot reloading
    environment:
      - PYTHONUNBUFFERED=1
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:7860/health"]
      interval: 30s
      timeout: 10s
      retries: 3

# Could be useful later on
#     depends_on:
#       - db  # If you have a database service, add it here

#   # Example database service (optional)
#   db:
#     image: postgres:latest
#     container_name: similarity-search-db
#     environment:
#       POSTGRES_USER: user
#       POSTGRES_PASSWORD: password
#       POSTGRES_DB: mydatabase
#     ports:
#       - "5432:5432"
#     volumes:
#       - postgres_data:/var/lib/postgresql/data
#     healthcheck:
#       test: ["CMD-SHELL", "pg_isready -U user -d mydatabase"]
#       interval: 5s
#       timeout: 5s
#       retries: 5

# volumes:
#   postgres_data: