~cytrogen/evi-run

evi-run/docker-compose.yml -rw-r--r-- 1.6 KiB
f9177ebb — Cytrogen fork: 定制修改 + 敏感数据清理 9 days ago
                                                                                
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
services:
  postgres:
    image: postgres:16
    container_name: postgres_agent_db
    environment:
      POSTGRES_USER: "${POSTGRES_USER}"
      POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
      POSTGRES_DB: "${POSTGRES_DB}"
    ports:
      - "5633:5432"
    volumes:
      - ./data/postgres/postgres_data:/var/lib/postgresql/data
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
      interval: 5s
      timeout: 5s
      retries: 5
      start_period: 30s

  redis:
    image: redis:latest
    container_name: redis_agent
    ports:
      - "6380:6379"
    volumes:
      - ./data/redis/data:/data
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 5s
      retries: 5

  bot:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: bot_agent
    env_file: .env
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    volumes:
      - ./data/images:/app/images
    restart: unless-stopped

  # Uncomment the fastapi service below if you need the payment module (pay mode).
  # NOTE: requires the payment_module/ directory to exist in the project root.
  # fastapi:
  #   build:
  #     context: .
  #     dockerfile: Dockerfile_fastapi
  #   container_name: fastapi_agent
  #   env_file: .env
  #   ports:
  #     - "8001:8000"
  #   depends_on:
  #     postgres:
  #       condition: service_healthy
  #     redis:
  #       condition: service_healthy