fizzy
fizzy copied to clipboard
Add docker-compose setup and configurable host domains
Summary
Adds Docker Compose setup for development and makes host domain configuration flexible via environment variables, enabling remote containerized development and production deployments.
Changes
1. Docker Compose Setup
- Added
docker-compose.ymlwith MailHog for email development - Replaces console email output with MailHog web UI for better email testing
- Enables containerized development with hot-reload support
2. Configurable Host Domains
- Replaced hardcoded domain patterns with
ALLOWED_HOST_DOMAINSenvironment variable - Added support for custom domains in both development and production environments
- Enables remote development and production container deployments
3. Documentation
- Updated README.md with Docker Compose usage and remote development instructions
- Updated config/deploy.yml with ALLOWED_HOST_DOMAINS configuration example
Why
- Makes the codebase more flexible for different deployment scenarios
- Enables proper email testing during development via MailHog
- Allows remote containerized development without modifying code
- Follows the same configuration pattern as #1911 (environment variable-based configuration)
Testing
- Tested Docker Compose setup with MailHog email capture
- Verified remote hostname access via ALLOWED_HOST_DOMAINS environment variable
- Confirmed subdomain matching works correctly for configured domains
cc @kevinmcconnell, related to improving OSS deployment
Replaces console email output with MailHog web UI for better email testing
Note that we do currently have letter_opener for testing emails. You can enable that with bin/rails dev:email, and then any emails sent in development will open in the browser automatically.