update docker-compose.yml for build

This commit is contained in:
2026-04-06 18:59:01 +08:00
parent f754f6a275
commit 4206c57478

View File

@@ -1,30 +1,50 @@
services: 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: web:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: openclaw-archive container_name: agentbase-web
env_file: env_file:
- .env - .env
environment:
DB_HOST: db
DB_PORT: 5432
DB_NAME: openclaw_archive
DB_USER: openclaw
DB_PASSWORD: openclaw_archive_pass
ports: ports:
- "${DJANGO_PORT:-6789}:${DJANGO_PORT:-8000}" - "8000:8000"
volumes: volumes:
- static_volume:/app/staticfiles - ./static_volume:/app/staticfiles
- jsonl_archive:/app/archive depends_on:
db:
condition: service_healthy
restart: unless-stopped restart: unless-stopped
command: >
# nginx placeholder (uncomment for production) sh -c "python manage.py migrate &&
# nginx: python manage.py createsuperuser --noinput ||
# image: nginx:alpine true &&
# container_name: openclaw-nginx gunicorn --bind 0.0.0.0:8000 --workers 2 --timeout 120 config.wsgi:application"
# ports:
# - "80:80"
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
# - static_volume:/app/staticfiles:ro
# depends_on:
# - web
volumes: volumes:
db_data:
static_volume: static_volume:
jsonl_archive: