- Add PYTHONPATH/DJANGO_SETTINGS_MODULE for Docker environment - Fix gunicorn bind port (8000 instead of 8765) - Add whitenoise for static file serving - Fix JSONL parser: read role/content from event.message.* (nested structure) - Fix session counts (message_count/tool_call_count/error_count were all 0) - Increase DATA_UPLOAD_MAX_MEMORY_SIZE to 50MB for large batch syncs - Add STATIC_ROOT and WhiteNoise middleware for admin CSS - Fix index name length (>30 chars issue) - Replace unique_together with indexes (Django 5.x compatible) - Add graceful degradation for TimescaleDB hypertable creation - Add static_volume/ to .gitignore
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
services:
|
|
db:
|
|
image: timescale/timescaledb:latest-pg17
|
|
container_name: agentbase-db
|
|
environment:
|
|
POSTGRES_DB: openclaw_archive
|
|
POSTGRES_USER: openclaw
|
|
POSTGRES_PASSWORD: openclaw_archive_pass
|
|
volumes:
|
|
- ./db_data:/var/lib/postgresql/data
|
|
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
|
|
ports:
|
|
- "5432:5432"
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U openclaw"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: agentbase-web
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
PYTHONPATH: /app/src
|
|
DJANGO_SETTINGS_MODULE: config.settings
|
|
DB_HOST: db
|
|
DB_PORT: "5432"
|
|
DB_NAME: openclaw_archive
|
|
DB_USER: openclaw
|
|
DB_PASSWORD: openclaw_archive_pass
|
|
DJANGO_SUPERUSER_USERNAME: admin
|
|
DJANGO_SUPERUSER_EMAIL: admin@example.com
|
|
DJANGO_SUPERUSER_PASSWORD: admin123
|
|
ports:
|
|
- "8765:8000"
|
|
volumes:
|
|
- ./static_volume:/app/staticfiles
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
python manage.py migrate
|
|
python manage.py createsuperuser --noinput || true
|
|
gunicorn --bind 0.0.0.0:8000 --workers 2 --timeout 120 config.wsgi:application
|
|
|
|
volumes:
|
|
db_data:
|
|
static_volume:
|