Files
rmser/docker-compose.yml

58 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

services:
# 1. База данных PostgreSQL
db:
image: postgres:15-alpine
container_name: rmser_db
restart: always
environment:
POSTGRES_USER: rmser
POSTGRES_PASSWORD: mhrcadmin994525
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=mhrcadmin994525 dbname=rmser_db port=5432 sslmode=disable TimeZone=Europe/Moscow
# Настройки Redis (внутри докера хост 'redis')
- REDIS_ADDR=redis:6379
# Настройки OCR (внутри докера хост 'ocr')
- OCR_SERVICE_URL=http://ocr:5000
# Остальные настройки (RMS, Telegram) берутся из config.yaml
volumes:
postgres_data: