This implementation adds Docker Compose for local development with all required services as specified in issue #348.
- PostgreSQL: Database with persistent storage, health checks, and initialization script
- Redis: Cache and queue management with password protection and health checks
- Mailhog: Email testing with web UI for inspecting emails
- LocalStack: AWS S3 emulation for file storage operations
- S3 Initialization: Automated bucket creation and CORS configuration
- Complete environment variables for all services
- Database connection settings for PostgreSQL
- Redis configuration with authentication
- Email settings for Mailhog SMTP
- AWS S3 settings for LocalStack
- JWT and application configuration
- PostgreSQL extensions setup
- Database initialization script
- Proper encoding and timezone configuration
- Automated S3 bucket creation
- CORS policy configuration
- Test file upload verification
- Uses Docker for AWS CLI operations
- README.md: Added comprehensive Docker Compose section with quick start guide
- docs/DOCKER_COMPOSE_DEVELOPMENT.md: Detailed development guide with troubleshooting
All services start successfully with docker-compose up -d:
- PostgreSQL: ✅ Healthy
- Redis: ✅ Healthy
- Mailhog: ✅ Running
- LocalStack: ✅ Healthy
Application can connect to all local services using the provided environment configuration.
- PostgreSQL: ✅
pg_isreadypasses - Redis: ✅
redis-cli pingreturns PONG - Mailhog: ✅ Web UI accessible at http://localhost:8025
- LocalStack: ✅ Health endpoint returns S3 as available
- SMTP Port: 1025 ✅ Accessible
- Web UI: http://localhost:8025 ✅ Accessible
- API:
/api/v1/messages✅ Working
- Endpoint: http://localhost:4566 ✅ Working
- Bucket:
strellerminds-dev-storage✅ Created - Operations: Upload/download ✅ Working
- Test File: ✅ Uploaded and verified
# Start all services
docker-compose up -d
# Copy environment file
cp development.env.example .env.development
# Install dependencies
npm install
# Start the application
npm run start:dev- Application: http://localhost:3000
- API Documentation: http://localhost:3000/api
- Mailhog Web UI: http://localhost:8025
- LocalStack S3: http://localhost:4566
docker-compose.yml- Main Docker Compose configurationdevelopment.env.example- Environment variables templatescripts/init-db.sql- Database initialization scriptscripts/setup-localstack.sh- S3 setup scriptdocs/DOCKER_COMPOSE_DEVELOPMENT.md- Comprehensive development guide
README.md- Added Docker Compose section with quick start guide
- Port: 5432
- Database: strellerminds_dev
- User: postgres
- Password: postgres
- Volume: Persistent storage
- Port: 6379
- Password: redis_password
- Database: 0
- Volume: Persistent storage
- SMTP Port: 1025
- Web UI Port: 8025
- Storage: Maildir format
- Port: 4566
- Region: us-east-1
- Access Key: test
- Secret Key: test
- Bucket: strellerminds-dev-storage
- Simplified Onboarding: New developers can start with
docker-compose up -d - Environment Parity: Local development matches CI environment
- Service Isolation: Each service runs in its own container
- Persistent Data: Volumes ensure data survives container restarts
- Health Monitoring: All services have proper health checks
- Easy Cleanup:
docker-compose down -vremoves everything
The Docker Compose setup is ready for use. Developers can now:
- Use
docker-compose up -dto start all services - Copy
development.env.exampleto.env.development - Run
npm run start:devto start the application - Access Mailhog at http://localhost:8025 for email testing
- Use LocalStack S3 for file operations testing
All acceptance criteria have been met and the implementation is complete! 🎉