Skip to content

chore: add development environment setup with Docker and mise#455

Draft
zackpollard wants to merge 3 commits intomainfrom
claude/discord-bot-dev-setup-4pALD
Draft

chore: add development environment setup with Docker and mise#455
zackpollard wants to merge 3 commits intomainfrom
claude/discord-bot-dev-setup-4pALD

Conversation

@zackpollard
Copy link
Copy Markdown
Member

Summary

This PR adds a complete local development environment setup for the Discord bot, including Docker Compose configuration for PostgreSQL, mise task automation, and TypeScript build configuration.

Key Changes

  • .mise/dev.env: Environment configuration file with Discord bot credentials (from 1Password), PostgreSQL connection string, and disabled service sentinels for Zulip, GitHub, Fourthwall, and Outline integrations
  • docker-compose.dev.yml: PostgreSQL 17 service with health checks, persistent volume storage, and port mapping for local development
  • .mise/config.toml: Task definitions for:
    • dev: Full development startup (install dependencies, start database, run bot with 1Password secrets)
    • dev:db: Database-only startup
    • dev:db:stop: Database cleanup
  • tsconfig.build.json: Build-specific TypeScript configuration that excludes test files, dist, and config files from compilation

Notable Implementation Details

  • Uses 1Password CLI (op run) for secure secret management in development
  • PostgreSQL health checks ensure database readiness before bot startup
  • Disabled services use "dev" sentinel values to skip initialization during local development
  • Build configuration properly excludes test files (.spec.ts) and Vitest config from compilation

https://claude.ai/code/session_01TSzRjasWFuj73EGRKsDowb

@zackpollard zackpollard changed the title Add development environment setup with Docker and mise chore: add development environment setup with Docker and mise Feb 25, 2026
Add a single-command dev setup (`mise run dev`) that:
- Starts a local PostgreSQL database via Docker Compose
- Injects Discord bot credentials from 1Password using `op run`
- Sets non-essential services (GitHub, Zulip, Fourthwall, Outline) to
  "dev" sentinel values to skip their initialization

https://claude.ai/code/session_01TSzRjasWFuj73EGRKsDowb
The `vitest.config.mts` at the project root causes tsc to infer
`rootDir` as the project root instead of `src/`, producing output at
`dist/src/main.js` instead of `dist/main.js`. This means `nest start`
can't find the entry file and the app never starts (so migrations
never run).

Add `tsconfig.build.json` (the standard NestJS build config that
NestJS CLI defaults to) which excludes `vitest.config.mts` and test
files, restoring the correct `dist/main.js` output structure.

Also add `npm install` to the mise dev task.

https://claude.ai/code/session_01TSzRjasWFuj73EGRKsDowb
@zackpollard zackpollard force-pushed the claude/discord-bot-dev-setup-4pALD branch from c6cfe0c to c528df4 Compare February 25, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants