Files
Home_assistant/docker-compose.yml
T
2026-06-16 09:19:32 +03:00

60 lines
1.6 KiB
YAML

services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-assistant}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-assistant}
POSTGRES_DB: ${POSTGRES_DB:-assistant}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-assistant} -d ${POSTGRES_DB:-assistant}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
qdrant:
image: qdrant/qdrant:v1.12.5
ports:
- "${QDRANT_PORT:-6333}:6333"
- "${QDRANT_GRPC_PORT:-6334}:6334"
volumes:
- qdrant_data:/qdrant/storage
restart: unless-stopped
backend:
build: ./backend
ports:
- "${BACKEND_PORT:-8080}:${BACKEND_INTERNAL_PORT:-8080}"
env_file: .env
environment:
QDRANT_URL: ${QDRANT_URL:-http://qdrant:6333}
DATABASE_URL: postgresql+psycopg2://${POSTGRES_USER:-assistant}:${POSTGRES_PASSWORD:-assistant}@postgres:5432/${POSTGRES_DB:-assistant}
depends_on:
postgres:
condition: service_healthy
qdrant:
condition: service_started
volumes:
- ./data:/app/data
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
frontend:
build:
context: ./frontend
args:
VITE_API_URL: ""
VITE_API_TOKEN: ${VITE_API_TOKEN:-}
ports:
- "${FRONTEND_PORT:-3080}:${FRONTEND_INTERNAL_PORT:-80}"
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data:
qdrant_data: