2026-02-06 20:02:48 +00:00
|
|
|
name: openclaw-mission-control
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
environment:
|
2026-02-07 07:15:53 +00:00
|
|
|
POSTGRES_DB: ${POSTGRES_DB:-mission_control}
|
2026-02-06 20:02:48 +00:00
|
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
ports:
|
2026-02-22 03:53:28 +00:00
|
|
|
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
|
2026-02-06 20:02:48 +00:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 20
|
|
|
|
|
|
2026-02-14 06:21:50 +00:00
|
|
|
redis:
|
|
|
|
|
image: redis:7-alpine
|
|
|
|
|
ports:
|
2026-02-22 03:53:28 +00:00
|
|
|
- "127.0.0.1:${REDIS_PORT:-6379}:6379"
|
2026-02-22 22:20:53 +01:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 5
|
2026-02-14 06:21:50 +00:00
|
|
|
|
2026-02-06 20:02:48 +00:00
|
|
|
backend:
|
|
|
|
|
build:
|
2026-02-07 11:29:06 +00:00
|
|
|
# Build from repo root so the backend image can include repo-level assets
|
2026-02-10 20:01:08 +05:30
|
|
|
# like `backend/templates/`.
|
2026-02-07 11:29:06 +00:00
|
|
|
context: .
|
|
|
|
|
dockerfile: backend/Dockerfile
|
2026-02-06 20:02:48 +00:00
|
|
|
env_file:
|
2026-02-27 18:34:58 +05:30
|
|
|
- ./backend/.env
|
2026-02-06 20:02:48 +00:00
|
|
|
environment:
|
|
|
|
|
# Override localhost defaults for container networking
|
2026-02-07 07:15:53 +00:00
|
|
|
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-mission_control}
|
2026-02-06 20:02:48 +00:00
|
|
|
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:3000}
|
|
|
|
|
DB_AUTO_MIGRATE: ${DB_AUTO_MIGRATE:-true}
|
2026-02-11 19:10:23 +05:30
|
|
|
AUTH_MODE: ${AUTH_MODE}
|
2026-02-11 19:30:25 +05:30
|
|
|
LOCAL_AUTH_TOKEN: ${LOCAL_AUTH_TOKEN}
|
2026-02-15 12:30:15 +05:30
|
|
|
RQ_REDIS_URL: redis://redis:6379/0
|
2026-02-06 20:02:48 +00:00
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
2026-02-14 06:21:50 +00:00
|
|
|
redis:
|
2026-02-22 22:20:53 +01:00
|
|
|
condition: service_healthy
|
2026-02-06 20:02:48 +00:00
|
|
|
ports:
|
|
|
|
|
- "${BACKEND_PORT:-8000}:8000"
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: ./frontend
|
|
|
|
|
args:
|
2026-03-03 02:40:28 +05:30
|
|
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-auto}
|
2026-02-11 19:10:23 +05:30
|
|
|
NEXT_PUBLIC_AUTH_MODE: ${AUTH_MODE}
|
2026-02-07 11:29:06 +00:00
|
|
|
# Optional, user-managed env file.
|
|
|
|
|
# IMPORTANT: do NOT load `.env.example` here because it contains non-empty
|
|
|
|
|
# placeholder Clerk keys, which can accidentally flip Clerk "on".
|
2026-02-06 20:02:48 +00:00
|
|
|
env_file:
|
2026-02-07 11:29:06 +00:00
|
|
|
- path: ./frontend/.env
|
|
|
|
|
required: false
|
2026-02-06 20:02:48 +00:00
|
|
|
environment:
|
2026-03-03 02:40:28 +05:30
|
|
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-auto}
|
2026-02-11 19:10:23 +05:30
|
|
|
NEXT_PUBLIC_AUTH_MODE: ${AUTH_MODE}
|
2026-02-06 20:02:48 +00:00
|
|
|
depends_on:
|
|
|
|
|
- backend
|
|
|
|
|
ports:
|
|
|
|
|
- "${FRONTEND_PORT:-3000}:3000"
|
2026-03-05 00:54:09 +05:30
|
|
|
develop:
|
|
|
|
|
watch:
|
|
|
|
|
# Rebuild frontend image when UI source or build config changes.
|
|
|
|
|
- action: rebuild
|
|
|
|
|
path: ./frontend/src
|
|
|
|
|
- action: rebuild
|
|
|
|
|
path: ./frontend/package.json
|
|
|
|
|
- action: rebuild
|
|
|
|
|
path: ./frontend/package-lock.json
|
|
|
|
|
- action: rebuild
|
|
|
|
|
path: ./frontend/next.config.ts
|
|
|
|
|
- action: rebuild
|
|
|
|
|
path: ./frontend/postcss.config.js
|
|
|
|
|
- action: rebuild
|
|
|
|
|
path: ./frontend/tailwind.config.cjs
|
|
|
|
|
- action: rebuild
|
|
|
|
|
path: ./frontend/tsconfig.json
|
2026-02-06 20:02:48 +00:00
|
|
|
|
2026-02-14 06:21:50 +00:00
|
|
|
webhook-worker:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: backend/Dockerfile
|
2026-03-02 14:57:00 +00:00
|
|
|
command: ["python", "scripts/rq-docker", "worker"]
|
2026-02-14 06:36:46 +00:00
|
|
|
env_file:
|
2026-02-27 18:34:58 +05:30
|
|
|
- ./backend/.env
|
2026-02-14 06:21:50 +00:00
|
|
|
depends_on:
|
2026-02-14 06:36:46 +00:00
|
|
|
redis:
|
2026-02-22 22:20:53 +01:00
|
|
|
condition: service_healthy
|
2026-02-14 06:36:46 +00:00
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
2026-02-14 06:21:50 +00:00
|
|
|
environment:
|
2026-02-14 06:36:46 +00:00
|
|
|
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-mission_control}
|
|
|
|
|
AUTH_MODE: ${AUTH_MODE}
|
|
|
|
|
LOCAL_AUTH_TOKEN: ${LOCAL_AUTH_TOKEN}
|
2026-02-15 12:30:15 +05:30
|
|
|
RQ_REDIS_URL: redis://redis:6379/0
|
|
|
|
|
RQ_QUEUE_NAME: ${RQ_QUEUE_NAME:-default}
|
|
|
|
|
RQ_DISPATCH_THROTTLE_SECONDS: ${RQ_DISPATCH_THROTTLE_SECONDS:-2.0}
|
|
|
|
|
RQ_DISPATCH_MAX_RETRIES: ${RQ_DISPATCH_MAX_RETRIES:-3}
|
2026-02-14 06:21:50 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
|
|
2026-02-06 20:02:48 +00:00
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|