89 lines
1.8 KiB
YAML
89 lines
1.8 KiB
YAML
name: gorych-bot
|
|
|
|
x-default-logging: &default-logging
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
services:
|
|
bot:
|
|
<<: *default-logging
|
|
build:
|
|
context: .
|
|
dockerfile: bot/Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./bot/.env
|
|
- ./postgres.env
|
|
environment:
|
|
- REDIS_URL=redis://redisdb:6379/0
|
|
- RAG_API_URL=http://rag_api:8000
|
|
depends_on:
|
|
redisdb:
|
|
condition: service_healthy
|
|
postgredb:
|
|
condition: service_healthy
|
|
rag_api:
|
|
condition: service_started
|
|
command: python aiogram_run.py
|
|
|
|
menu_scraper:
|
|
<<: *default-logging
|
|
build:
|
|
context: .
|
|
dockerfile: menu_scraper/Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./menu_scraper/.env
|
|
- ./postgres.env
|
|
volumes:
|
|
- ./data:/data
|
|
ports:
|
|
- "8010:8010"
|
|
|
|
rag_api:
|
|
<<: *default-logging
|
|
build:
|
|
context: .
|
|
dockerfile: rag_api/Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./rag_api/.env
|
|
- ./postgres.env
|
|
environment:
|
|
- ANONYMIZED_TELEMETRY=false
|
|
- HF_HOME=/data/huggingface
|
|
- TRANSFORMERS_CACHE=/data/huggingface
|
|
- HUGGINGFACE_HUB_CACHE=/data/huggingface
|
|
- HUGGINGFACE_CACHE_DIR=/data/huggingface
|
|
depends_on:
|
|
- menu_scraper
|
|
volumes:
|
|
- ./data:/data
|
|
ports:
|
|
- "8001:8000"
|
|
|
|
redisdb:
|
|
<<: *default-logging
|
|
image: redis:6-alpine
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
postgredb:
|
|
<<: *default-logging
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./postgres.env
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ruby -d postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|