File size: 959 Bytes
945d0f8
 
 
 
 
 
 
 
 
 
6a6337e
 
945d0f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
version: '3.8'

services:
  agriculture-bot:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: krushi-mitra-bot
    ports:
      - "7860:7860"
    env_file:
      - .env
    environment:
      TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
      WEATHER_API_URL: http://localhost:8001/weather
      PEST_API_URL: http://localhost:8000/api/predict
      WATER_API_URL: http://localhost:8002/predict
      PYTHONUNBUFFERED: 1
    volumes:
      - ./data:/app/data
      - ./dashboard_output.json:/app/dashboard_output.json
    networks:
      - agriculture-net
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:7860/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 5s
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

networks:
  agriculture-net:
    driver: bridge