fix: resolve startup issues and JSONL parsing bugs
- 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
This commit is contained in:
@@ -26,11 +26,16 @@ services:
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
PYTHONPATH: /app/src
|
||||
DJANGO_SETTINGS_MODULE: config.settings
|
||||
DB_HOST: db
|
||||
DB_PORT: 5432
|
||||
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:
|
||||
@@ -39,11 +44,13 @@ services:
|
||||
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:8765 --workers 2 --timeout 120 config.wsgi:application"
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user