Files
agent-base/docker-compose.yml
2026-04-06 19:02:51 +08:00

51 lines
1.2 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:
DB_HOST: db
DB_PORT: 5432
DB_NAME: openclaw_archive
DB_USER: openclaw
DB_PASSWORD: openclaw_archive_pass
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: