initial
This commit is contained in:
122
docker-compose.yml
Normal file
122
docker-compose.yml
Normal file
@@ -0,0 +1,122 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-airpg}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-airpg}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-airpg_secret}
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-airpg}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
volumes:
|
||||
- redisdata:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
|
||||
qdrant:
|
||||
image: qdrant/qdrant:v1.11.3
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6333:6333"
|
||||
- "6334:6334"
|
||||
volumes:
|
||||
- qdrantdata:/qdrant/storage
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
qdrant:
|
||||
condition: service_started
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-airpg}:${POSTGRES_PASSWORD:-airpg_secret}@postgres:5432/${POSTGRES_DB:-airpg}
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
QDRANT_URL: http://qdrant:6333
|
||||
JWT_SECRET: ${JWT_SECRET:-change_me_in_production_please}
|
||||
ADMIN_SETUP_TOKEN: ${ADMIN_SETUP_TOKEN:-}
|
||||
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:5173,http://localhost:8080}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
# Default LLM settings (overridable via admin panel)
|
||||
DEFAULT_LLM_BASE_URL: ${DEFAULT_LLM_BASE_URL:-http://host.docker.internal:1234/v1}
|
||||
DEFAULT_LLM_API_KEY: ${DEFAULT_LLM_API_KEY:-dummy}
|
||||
DEFAULT_LLM_MODEL: ${DEFAULT_LLM_MODEL:-local-model}
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
# Print admin setup token to console on first run
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
qdrant:
|
||||
condition: service_started
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-airpg}:${POSTGRES_PASSWORD:-airpg_secret}@postgres:5432/${POSTGRES_DB:-airpg}
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
QDRANT_URL: http://qdrant:6333
|
||||
JWT_SECRET: ${JWT_SECRET:-change_me_in_production_please}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
DEFAULT_LLM_BASE_URL: ${DEFAULT_LLM_BASE_URL:-http://host.docker.internal:1234/v1}
|
||||
DEFAULT_LLM_API_KEY: ${DEFAULT_LLM_API_KEY:-dummy}
|
||||
DEFAULT_LLM_MODEL: ${DEFAULT_LLM_MODEL:-local-model}
|
||||
WORKER_MODE: "1"
|
||||
command: ["python", "-m", "app.workers.main"]
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
target: ${FRONTEND_BUILD_TARGET:-dev}
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
environment:
|
||||
VITE_API_URL: ${VITE_API_URL:-http://localhost:8000}
|
||||
ports:
|
||||
- "5173:5173"
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
redisdata:
|
||||
qdrantdata:
|
||||
Reference in New Issue
Block a user