feat: add mongo and redis services to compose.dev.yml#397
Conversation
|
Claude finished @davidpoblador's task —— View job Code Review Complete ✅Reviewing PR #397: "feat: add mongo and redis services to compose.dev.yml" Todo List:
🔍 Code Review SummaryThis PR successfully adds MongoDB and Redis services to the development Docker Compose setup. The implementation is well-structured and follows Docker best practices, but there are several security and maintainability concerns that should be addressed. ✅ StrengthsDocker Best Practices
Configuration Management
Code Organization
|
|
Claude finished @davidpoblador's task —— View job Code Review Complete ✅Reviewing PR #397: "feat: add mongo and redis services to compose.dev.yml" Todo List:
🔍 Code Review SummaryThis PR successfully adds MongoDB and Redis services to the development Docker Compose setup. The implementation follows Docker best practices and achieves the goal of zero-setup development, but there are some critical issues that need to be addressed before merging. ✅ StrengthsDocker Best Practices
Configuration Management
🚨 Critical Issues1. MongoDB Initialization Script Bug (
|
|
Claude finished @davidpoblador's task —— View job Code Review Complete ✅Reviewing PR #397: "feat: add mongo and redis services to compose.dev.yml" Todo List:
🔍 Code Review SummaryThis PR successfully adds MongoDB and Redis services to the development Docker Compose setup. The implementation is well-structured and follows Docker best practices, but there are several security and maintainability concerns that should be addressed. ✅ StrengthsDocker Best Practices
Configuration Management
Code Organization
|
|
Claude finished @davidpoblador's task —— View job Code Review Complete ✅Reviewing PR #397: "feat: add mongo and redis services to compose.dev.yml" Todo List:
🔍 Code Review SummaryThis PR successfully adds MongoDB and Redis services to the development Docker Compose setup. The implementation is well-structured and follows Docker best practices, but there are several critical issues that need to be addressed before merging. ✅ StrengthsDocker Best Practices
Configuration Management
Code Organization
🚨 Critical Issues1. MongoDB Initialization Script Bug (
|
|
Claude finished @davidpoblador's task —— View job Code Review Complete ✅Reviewing PR #397: "feat: add mongo and redis services to compose.dev.yml" Todo List:
🔍 Code Review SummaryThis PR successfully adds MongoDB and Redis services to the development Docker Compose setup. The implementation follows many Docker best practices, but there are critical issues that need to be addressed before merging. ✅ StrengthsDocker Best Practices
Configuration Management
🚨 Critical Issues1. Missing MongoDB Environment Variables (
|
|
Claude finished @davidpoblador's task —— View job Code Review Complete ✅Reviewing PR #397: "feat: add mongo and redis services to compose.dev.yml" Todo List:
🔍 Code Review SummaryThis PR adds MongoDB and Redis services to the development Docker Compose setup. After analyzing the recent commits and current state, I can see this has been refined through multiple iterations. The current implementation is significantly improved but has some critical issues that need attention. ✅ StrengthsDocker Best Practices
Configuration Management
🚨 Critical Issues1. MongoDB Service Missing Required Configuration (
|
- Add mongo service with official MongoDB 8.0 image - Add redis service with official Redis 8.0-alpine image - Configure persistent volumes for data storage - Add health checks and service dependencies - Update .env.j2 to use Docker service names for development - Add mongo-init.js script for database initialization - Preserve external database URLs as comments for production use
- Change MongoDB host port from 27017 to 27018 - Change Redis host port from 6379 to 6380 - Prevents port conflicts when developers have local MongoDB/Redis installed - Container ports remain the same (27017, 6379) for internal communication
- Change MongoDB port from 27018 back to 27017 - Change Redis port from 6380 back to 6379 - Aligns with environment template configuration
…rvices - Add configurable MongoDB environment variables with defaults - Add Redis environment variables with password support - Make services more configurable through environment variables - Maintain backward compatibility with existing setups
- Remove unnecessary environment variable placeholders - Use hardcoded values for development setup - Keep only COMPOSE_PROJECT_NAME for database naming - Redis and MongoDB services are always predictable
- Remove mongo-init.js volume mount and entrypoint - Simplify MongoDB setup for development - Database initialization handled by application layer
- Remove MONGO_INITDB_ROOT_USERNAME, MONGO_INITDB_ROOT_PASSWORD, and MONGO_INITDB_DATABASE - Simplify MongoDB service to basic configuration - Application handles database creation and authentication
2bc73e2 to
fcadd7c
Compare
|
Claude finished @davidpoblador's task —— View job Code Review Complete ✅Reviewing PR #397: "feat: add mongo and redis services to compose.dev.yml" Todo List:
🔍 Code Review SummaryThis PR adds MongoDB and Redis services to the development Docker Compose setup. After analyzing the implementation and commit history, I can see this has been refined through several iterations. The current implementation is significantly improved but has critical issues that will prevent it from working correctly. ✅ StrengthsDocker Best Practices
Configuration Management
🚨 Critical Issues1. MongoDB Service Missing Required Configuration (
|
|
Claude finished @davidpoblador's task —— View job Code Review Complete ✅Reviewing PR #397: "feat: add mongo and redis services to compose.dev.yml" Todo List:
🔍 Code Review SummaryThis PR adds MongoDB and Redis services to the development Docker Compose setup. After reviewing the latest iteration and commit history, I can see this has been significantly improved through multiple refinements. The current implementation is clean and follows a pragmatic approach for development environments. ✅ StrengthsDocker Best Practices
Configuration Management
Code Organization
🚀 Technical Implementation AnalysisMongoDB Configurationmongo:
image: mongo:8.0
restart: unless-stopped
volumes:
- mongo_data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]Assessment: ✅ Well implemented
Redis Configurationredis:
image: redis:8.0-alpine
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis_data:/dataAssessment: ✅ Excellent implementation
App Service Dependenciesapp:
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_healthy
environment:
- MONGODB_URL=mongodb://mongo:27017
- REDIS_URL=redis://redis:6379Assessment: ✅ Perfect implementation
|
🤖 I have created a release *beep* *boop* --- ## [2.16.0](v2.15.2...v2.16.0) (2025-11-08) ### Features * add .env.j2 template for scaffolded projects ([#395](#395)) ([da335b5](da335b5)) * add mongo and redis services to compose.dev.yml ([#397](#397)) ([9c299f9](9c299f9)) * integrate docs publishing into unified publish workflow ([#401](#401)) ([e615b43](e615b43)) ### Code Refactoring * simplify template structure and improve organization ([#398](#398)) ([16f1b27](16f1b27)) ### Miscellaneous Chores * **deps:** update mongo docker tag to v8.2 ([#400](#400)) ([f3c9f46](f3c9f46)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
Fixes issue where
just devfailed due to missing mongo/redis services and localhost URLs not working in Docker context.Key Changes
just devnow works immediately without external databasesTesting