Backend infrastructure: - PostgreSQL models (users, channels, messages, DMs, files, artifacts) - JWT authentication with password hashing - Auth API (register, login, logout, get user) - Channels API (create, list, join, leave) - Messages API with @grimlock mention detection - AI responds automatically when @mentioned - Background task processing for AI responses Database: - SQLAlchemy ORM models - Alembic ready for migrations - PostgreSQL + Redis in docker-compose Features working: - User registration and login - Create/join public channels - Send messages in channels - @grimlock triggers AI response with channel context - Real-time ready (WebSocket next) Next: WebSocket for real-time updates, frontend interface
66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: grimlock-postgres
|
|
environment:
|
|
POSTGRES_DB: grimlock
|
|
POSTGRES_USER: grimlock
|
|
POSTGRES_PASSWORD: grimlock
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U grimlock"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: grimlock-redis
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
grimlock-backend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.backend
|
|
container_name: grimlock-backend
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
|
- DATABASE_URL=postgresql://grimlock:grimlock@postgres:5432/grimlock
|
|
- SECRET_KEY=${SECRET_KEY:-change-this-in-production}
|
|
- HOST=0.0.0.0
|
|
- PORT=8000
|
|
- DEBUG=true
|
|
- CONTEXT_PATH=/app/context
|
|
- AI_MODEL=claude-sonnet-4-5-20250514
|
|
- LOG_LEVEL=INFO
|
|
volumes:
|
|
- ./backend/context:/app/context:ro
|
|
- ./backend:/app:ro
|
|
restart: unless-stopped
|
|
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
|
|
|
|
volumes:
|
|
postgres_data:
|
|
|
|
networks:
|
|
default:
|
|
name: grimlock-network
|