Skip to main content

Chatwoot Support Platform Deployment

Date: 2026-04-07 Status: Production Ready (Ops Complete)

VM Infrastructure

ItemValue
ProviderGCP
Instancechatwoot-vm
Zoneus-central1-a
Machine Typee2-standard-2
External IP34.30.168.118

DNS

HostnamePoints To
support.aovis.app34.30.168.118

SSL

  • Let's Encrypt (Certbot)
  • Certificate: /etc/letsencrypt/live/support.aovis.app/

Container Stack

ServiceImagePort
postgrespgvector/pgvector:pg16-trixie5432
redisredis:alpine6379
railschatwoot/chatwoot:latest3000
sidekiqchatwoot/chatwoot:latest-

Configuration

  • Compose: ~/chatwoot/docker-compose.yaml
  • Env: ~/chatwoot/.env (VM-local, never commit)

Database (生产环境 - 已加固)

  • User: postgres
  • Password: 已升级为 48 位随机密码
  • Host: postgres (Docker internal)

SMTP (生产环境 - 已配置)

Secrets (VM-local only)

  • SECRET_KEY_BASE: 64 位十六进制密钥
  • 数据库密码: 48 位随机字符串
  • SMTP 密码: 网易企业邮授权码
  • 以上均存储在 VM 本地 ~/chatwoot/.env,禁止提交到仓库

Verification (2026-04-06)

  • support.aovis.app → 200 OK
  • Chatwoot 后台可登录
  • 用户已创建 ([email protected], SuperAdmin)
  • SECRET_KEY_BASE 已持久化到 .env
  • 数据库密码已升级
  • SMTP 配置已生效

Commands

# SSH
gcloud compute ssh chatwoot-vm --zone=us-central1-a

# Restart
cd ~/chatwoot && docker compose restart

# Logs
cd ~/chatwoot && docker compose logs -f

Risks

  • 首次部署后需手动 sudo systemctl reload nginx
  • 数据库密码存储在 VM 本地,备份时请包含 .env 文件

Operations Completed (2026-04-07)

Deployment Record

Inbox Configuration

  • Inbox Name: AOVIS
  • Channel: Web Widget (Channel::WebWidget)
  • Reply Time Setting: in_a_few_minutes
  • Email Continuity: Enabled (continuity_via_email: true)
  • Email Collection: Enabled

Widget Customization

  • Welcome Title: "Welcome to AOVIS Support"
  • Welcome Tagline: "We are here to help. Send us a message and we will respond as soon as possible."
  • Website URL: aovis.us
  • Allowed Domains: (none - accepts all)

Support Entry Convention

  • Primary storefront support actions now open Chatwoot first.
  • Preferred labels: Chat with Us and Get Support.
  • If a support button points to a page instead of chat, use Support Center.
  • Keep [email protected] as a secondary fallback or small-text contact option.
  • Do not promote email above Chatwoot when the widget is available.

Health Check Commands

# All services
docker ps

# Rails API
curl -s -o /dev/null -w '%{http_code}' http://localhost:3000/

# Nginx
sudo systemctl status nginx

# PostgreSQL (inside container)
docker exec chatwoot-postgres-1 psql -U postgres -d chatwoot_production -c 'SELECT 1'

# Redis
docker exec chatwoot-redis-1 redis-cli ping

Maintenance Commands

# Restart all services
cd ~/chatwoot && docker compose restart

# Restart specific service
docker compose restart rails

# View logs
docker compose logs -f rails
docker compose logs -f sidekiq

# SSH to container
docker exec -it chatwoot-rails-1 bash

Shared Infrastructure Context

This section preserves the lightweight operational context that used to live in the stray ai_System/memory/infrastructure_context.md file. It is kept here so future operators and AI tools have one canonical deployment reference.

Current Deployment State

  • Chatwoot support stack is live on GCP chatwoot-vm in us-central1-a.
  • Static IP: 34.30.168.118.
  • Support domain: support.aovis.app.
  • Direct store production deploy path uses aovis-store-staging-vm in project aovis-site-1.
  • For the current Chatwoot widget integration history, see the Phase 0 deployment record and the live release notes:

Operational Notes

  • Use gcloud compute ssh for VM access.
  • The working Google account for aovis-site-1 access is the account that has aovis-site-1 visibility in gcloud projects list.
  • VM-local secrets must stay in /opt/aovis/aovis-store-staging/.env.production for the app VM and ~/chatwoot/.env for the Chatwoot VM.
  • Do not overwrite VM-local secret files with repo sync, bulk scp, or rsync.
  • Keep production secrets out of repository files, docs, and shared memory.

Chatwoot Widget

  • aovis.app loads Chatwoot from https://support.aovis.app.
  • Widget token and host are VM-local environment variables on the app VM.
  • The widget integration remains a minimal footer-level injection through the shared layout.

Verification Summary

  • support.aovis.app returned 200 OK.
  • aovis.app returned 200 OK from the VM-side check.
  • pm2 for aovis-store-staging was online after the release build and restart.
  • Production build completed successfully on the app VM after the Chatwoot widget integration.

Reminder

  • This file should only contain deployment summary and handling rules.
  • Never add raw passwords, tokens, or full secret values here.

Backup & Recovery

  • Secrets Location: ~/chatwoot/.env (VM-local only)
  • Database: PostgreSQL in Docker, data persists in volume
  • SECRET_KEY_BASE: Stored in .env, required for Rails boot
  • Backup Note: Include ~/chatwoot/.env in any VM-level backups