Files
gochat/deploy/quickstart
Rogee 92f0d51375 refactor: 统一 DB/Redis 配置为 DSN 模式 + 移除 Helm/K8s 部署
- DatabaseConfig: Host/Port/User/Password/Name/DBName/SSLMode → 单个 DSN 字段
- RedisConfig: Host/Port/Password/DB/URL → 单个 DSN 字段
- 环境变量: GOCHAT_DATABASE_* (7个) → GOCHAT_DATABASE_DSN, GOCHAT_REDIS_* (5个) → GOCHAT_REDIS_DSN
- validator.go: DSN URL 解析校验 (scheme + host)
- redis.go: redis.ParseURL(cfg.DSN) 直连
- 所有 docker-compose / CI / shell 脚本 / .env 同步更新
- 删除 deploy/helm/ 整个目录 (20个文件)
- CI 删除 helm-validate / deploy-staging / deploy-production 三个 job
- 文档同步更新 (README, 架构设计, PRD, 滚动升级)
2026-07-29 20:58:10 +08:00
..
2026-06-15 14:34:17 +08:00

GoChat Docker Compose Quickstart

This directory starts a local GoChat stack for manual business validation:

  • GoChat API on http://127.0.0.1:3000
  • PostgreSQL + pgvector
  • Redis
  • Meilisearch
  • Mailhog SMTP/Web UI
  • Optional deterministic seed data

It is intended for local/UAT quickstart, not hardened production deployment.

Prerequisites

  • Docker Engine with Compose v2 (docker compose version)
  • Free local ports: 3000, 5432, 6379, 7700, 1025, 8025

If those ports conflict, edit .env after copying .env.example.

Start

cd deploy/quickstart
cp .env.example .env
docker compose up -d --build

Wait until GoChat is healthy:

docker compose ps
docker compose logs -f gochat
curl -fsS http://127.0.0.1:3000/health

Seed Demo Data

docker compose --profile seed run --rm seed

Default login after seeding:

  • Email: admin@gochat.local
  • Password: changeme

Change these values in .env before running the seed command if needed.

Useful Commands

# Follow all logs
docker compose logs -f

# Restart GoChat only
docker compose restart gochat

# Stop without deleting data
docker compose down

# Reset all local data
docker compose down -v

Notes

  • GoChat runs migrations automatically on startup with GOCHAT_DATABASE_RUN_MIGRATIONS=true.
  • The production image includes /app/migrations; GoChat runs them automatically on startup in this quickstart stack.
  • Meilisearch uses the quickstart key from .env; change it before sharing this stack.
  • Mailhog Web UI is available at http://127.0.0.1:8025.