cm_whatsapp_bot_v1/docker-compose.base.yml
yiekheng 46c0315559 refactor(db): drop operators.telegram_user_id (not used since v1.0)
The Telegram bot phase ended in Plan 3 — the operator now signs in
via username + password. Migration 0011 drops the legacy column +
its unique index. seed.ts no longer reads SEED_OPERATOR_TELEGRAM_ID;
docker-compose.base.yml swaps the env to SEED_OPERATOR_USERNAME
(default 'admin'); .env.development follows. Settings page shows
'Username' instead of 'Operator ID'. Auth-and-prod-hardening plan
doc updated to drop the synthetic telegram_user_id from the
create-user CLI script and createUserAction insert.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 17:39:46 +08:00

45 lines
1.1 KiB
YAML

services:
tools:
build:
context: .
dockerfile: docker/tools.Dockerfile
image: cm-whatsapp-tools:dev
container_name: cmbot-tools
user: "${HOST_UID:-1000}:${HOST_GID:-1000}"
working_dir: /workspace
command: ["tail", "-f", "/dev/null"]
volumes:
- .:/workspace
environment:
HOME: /tmp
PNPM_HOME: /workspace/.pnpm-store
DATABASE_URL: ${DATABASE_URL}
DATA_DIR: ${DATA_DIR:-/data}
SESSIONS_DIR: ${SESSIONS_DIR:-/data/sessions}
MEDIA_DIR: ${MEDIA_DIR:-/data/media}
BOT_HEALTH_PORT: ${BOT_HEALTH_PORT:-8081}
BOT_LOG_LEVEL: ${BOT_LOG_LEVEL:-info}
SEED_OPERATOR_USERNAME: ${SEED_OPERATOR_USERNAME:-admin}
SEED_OPERATOR_NAME: ${SEED_OPERATOR_NAME:-Operator}
networks:
- cmbot
web:
build:
context: .
dockerfile: docker/web.Dockerfile
image: cm-whatsapp-web:local
container_name: cmbot-web
restart: unless-stopped
environment:
DATABASE_URL: ${DATABASE_URL}
DATA_DIR: ${DATA_DIR}
MEDIA_DIR: ${MEDIA_DIR}
WEB_PORT: ${WEB_PORT}
networks:
- cmbot
networks:
cmbot:
driver: bridge