54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
services:
|
|
messages_db:
|
|
image: postgres:latest
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
|
|
- POSTGRES_DB=${POSTGRES_DB:-messages}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- data:/var/lib/postgresql
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-messages}",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
env_file:
|
|
- .env
|
|
|
|
naliia_bot:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8010:8010"
|
|
depends_on:
|
|
messages_db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./src:/app/src
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- LLM_MODEL=${LLM_MODEL:-deepseek}
|
|
- POSTGRES_HOST=${POSTGRES_HOST:-db}
|
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
|
|
- POSTGRES_DB=${POSTGRES_DB:-messages}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:8010/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
data:
|
|
src:
|