.venv deleted

ocr ready to test
This commit is contained in:
2025-11-29 12:29:08 +03:00
parent 449556c4e4
commit 91923b8616
2094 changed files with 562 additions and 370942 deletions

58
docker-compose.yml Normal file
View File

@@ -0,0 +1,58 @@
services:
# 1. База данных PostgreSQL
db:
image: postgres:15-alpine
container_name: rmser_db
restart: always
environment:
POSTGRES_USER: rmser
POSTGRES_PASSWORD: rmser_password
POSTGRES_DB: rmser_db
ports:
- "5455:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
# 2. Redis (если понадобится в будущем, пусть будет)
redis:
image: redis:7-alpine
container_name: rmser_redis
restart: always
ports:
- "6379:6379"
# 3. Python OCR Service
ocr:
build: ./ocr-service
container_name: rmser_ocr
restart: always
ports:
- "5005:5000"
environment:
- LOG_LEVEL=INFO
# 4. Go Application (Основной сервис)
app:
build: .
container_name: rmser_app
restart: unless-stopped
depends_on:
- db
- redis
- ocr
ports:
- "8080:8080"
# Переопределяем конфиг через ENV переменные
# Формат: СЕКЦИЯ_КЛЮЧ (Viper AutomaticEnv с заменой точки на _)
environment:
# Настройки БД (внутри докера хост 'db')
- DB_DSN=host=db user=rmser password=rmser_password dbname=rmser_db port=5455 sslmode=disable TimeZone=Europe/Moscow
# Настройки Redis (внутри докера хост 'redis')
- REDIS_ADDR=redis:6379
# Настройки OCR (внутри докера хост 'ocr')
- OCR_SERVICE_URL=http://ocr:5005
# Остальные настройки (RMS, Telegram) берутся из config.yaml
volumes:
postgres_data: