45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
services:
|
|
db:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-mpakoimageaibot}
|
|
POSTGRES_USER: ${POSTGRES_USER:-mpako}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD должен быть задан в .env}
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
bot:
|
|
image: mpakoimageaibot:latest
|
|
build: .
|
|
env_file: .env
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- ./storage:/app/storage
|
|
- ./data:/app/data
|
|
restart: unless-stopped
|
|
|
|
web:
|
|
image: mpakoimageaibot:latest
|
|
build: .
|
|
command: ["uvicorn", "web:app", "--host", "0.0.0.0", "--port", "8080"]
|
|
env_file: .env
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${WEB_BIND_IP:-127.0.0.1}:8099:8080"
|
|
volumes:
|
|
- ./storage:/app/storage
|
|
- ./data:/app/data
|
|
restart: unless-stopped
|