74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
|
|
version: '3.8'
|
||
|
|
|
||
|
|
services:
|
||
|
|
postgres:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
environment:
|
||
|
|
POSTGRES_USER: hermes
|
||
|
|
POSTGRES_PASSWORD: hermes123
|
||
|
|
POSTGRES_DB: hermes_live
|
||
|
|
ports:
|
||
|
|
- "5432:5432"
|
||
|
|
volumes:
|
||
|
|
- pgdata:/var/lib/postgresql/data
|
||
|
|
restart: unless-stopped
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U hermes -d hermes_live"]
|
||
|
|
interval: 5s
|
||
|
|
timeout: 3s
|
||
|
|
retries: 5
|
||
|
|
|
||
|
|
hermes:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile.hermes
|
||
|
|
ports:
|
||
|
|
- "11434:11434"
|
||
|
|
volumes:
|
||
|
|
- hermes_profiles:/root/.hermes/profiles
|
||
|
|
restart: unless-stopped
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "curl -f http://localhost:11434/v1/models || exit 1"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 10
|
||
|
|
start_period: 60s
|
||
|
|
|
||
|
|
backend:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile.backend
|
||
|
|
ports:
|
||
|
|
- "8000:8000"
|
||
|
|
volumes:
|
||
|
|
- ./backend:/app
|
||
|
|
- hermes_profiles:/root/.hermes/profiles
|
||
|
|
env_file:
|
||
|
|
- ./backend/.env
|
||
|
|
environment:
|
||
|
|
DATABASE_URL: postgresql+asyncpg://hermes:hermes123@postgres:5432/hermes_live
|
||
|
|
HERMES_API_URL: http://hermes:11434/v1
|
||
|
|
depends_on:
|
||
|
|
postgres:
|
||
|
|
condition: service_healthy
|
||
|
|
hermes:
|
||
|
|
condition: service_healthy
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
frontend:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile.frontend
|
||
|
|
ports:
|
||
|
|
- "3000:3000"
|
||
|
|
volumes:
|
||
|
|
- ./frontend:/app
|
||
|
|
- /app/node_modules
|
||
|
|
depends_on:
|
||
|
|
- backend
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
pgdata:
|
||
|
|
hermes_profiles:
|