File size: 2,104 Bytes
0a9f9c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# BLUESCARF AI HR Assistant - Docker Compose Configuration
# For local development and production deployment

version: '3.8'

services:
  hr-assistant:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: bluescarf-hr-assistant
    restart: unless-stopped
    ports:
      - "8501:8501"
    environment:
      # Application Configuration
      - ENVIRONMENT=production
      - COMPANY_NAME=BLUESCARF ARTIFICIAL INTELLIGENCE
      
      # Performance Optimization
      - CHUNK_SIZE=1000
      - MAX_CONTEXT_CHUNKS=5
      - EMBEDDING_BATCH_SIZE=16
      
      # Security Settings
      - SESSION_TIMEOUT_HOURS=8
      - ADMIN_SESSION_TIMEOUT_HOURS=2
      
      # Logging
      - LOG_LEVEL=INFO
      - ENABLE_INTERACTION_LOGGING=true
    volumes:
      # Persistent vector database storage
      - vector_db_data:/app/vector_db
      
      # Persistent logs
      - logs_data:/app/logs
      
      # Optional: Custom logo (uncomment and provide path)
      # - ./custom_logo.png:/app/logo.png:ro
      
      # Optional: Custom configuration (uncomment if using)
      # - ./production.env:/app/.env:ro
    
    # Resource limits for production
    deploy:
      resources:
        limits:
          memory: 2G
          cpus: '1.0'
        reservations:
          memory: 1G
          cpus: '0.5'
    
    # Health check configuration
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    
    # Networking
    networks:
      - hr_assistant_network

# Named volumes for data persistence
volumes:
  vector_db_data:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: ./data/vector_db
  
  logs_data:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: ./data/logs

# Custom network for isolation
networks:
  hr_assistant_network:
    driver: bridge

# Development override (create docker-compose.dev.yml for development)
# To use: docker-compose -f docker-compose.yml -f docker-compose.dev.yml up