Skip to content

Conversation

manavgup
Copy link
Owner

@manavgup manavgup commented Oct 8, 2025

Summary

Adds production docker-compose configuration and improves local development workflow by enabling containerless development.

Changes

Production Deployment

  • New docker-compose.production.yml file for full containerized deployment
    • Uses GHCR images by default (ghcr.io/manavgup/rag_modulo/backend:latest, frontend:latest)
    • Supports custom image override via BACKEND_IMAGE and FRONTEND_IMAGE env vars
    • Extends infrastructure services from docker-compose-infra.yml (DRY principle)
    • Proper networking with rag-network bridge
    • Environment variable configuration for container networking

Local Development Improvement

  • Updated frontend/package.json proxy configuration
    • Changed from http://backend:8000 to http://localhost:8000
    • Enables containerless development (npm run dev + poetry run uvicorn)
    • Faster iteration cycle without rebuilding containers
    • Required for local development workflow documented in Makefile

Usage

Production Deployment (All Containers)

make prod-start     # Start production environment
make prod-stop      # Stop production environment
make prod-logs      # View logs
make prod-status    # Check status

Local Development (No Containers)

make local-dev-infra     # Start infrastructure only
make local-dev-backend   # Start backend locally with hot-reload
make local-dev-frontend  # Start frontend locally with HMR

Benefits

Production Deployment:

  • Production-like testing environment
  • Uses same images as CI/CD pipeline
  • Easy deployment to cloud providers
  • Consistent with GitHub Container Registry workflow

Local Development:

  • Instant hot-reload (no container rebuilds)
  • Faster commits (pre-commit hooks work natively)
  • Native debugging support
  • Poetry and npm caches work locally

Testing

  • Tested production deployment with GHCR images
  • Verified local development workflow with proxy change
  • Confirmed services communicate correctly in both modes
  • Validated make targets work as documented

Signed-off-by: Manav Gupta manavg@gmail.com

- Add docker-compose.production.yml for full containerized deployment
  - Uses GHCR images by default with variable override support
  - Extends infrastructure services from docker-compose-infra.yml
  - Includes backend and frontend services with proper networking
  - Enables production-like testing and deployment

- Update frontend/package.json proxy for local development
  - Change proxy from http://backend:8000 to http://localhost:8000
  - Enables direct backend communication in local dev mode
  - Required for containerless development workflow with npm run dev

Signed-off-by: Manav Gupta <manavg@gmail.com>
Copy link
Contributor

github-actions bot commented Oct 8, 2025

🚀 Development Environment Options

This repository supports Dev Containers for a consistent development environment.

Option 1: GitHub Codespaces (Recommended)

Create a cloud-based development environment:

  1. Click the green Code button above
  2. Select the Codespaces tab
  3. Click Create codespace on pr-05-local-dev-workflow
  4. Wait 2-3 minutes for environment setup
  5. Start coding with all tools pre-configured!

Option 2: VS Code Dev Containers (Local)

Use Dev Containers on your local machine:

  1. Install Docker Desktop
  2. Install VS Code
  3. Install the Dev Containers extension
  4. Clone this PR branch locally
  5. Open in VS Code and click "Reopen in Container" when prompted

Option 3: Traditional Local Setup

Set up the development environment manually:

# Clone the repository
git clone https://github.com/manavgup/rag_modulo.git
cd rag_modulo
git checkout pr-05-local-dev-workflow

# Initialize development environment
make dev-init
make dev-build
make dev-up
make dev-validate

Available Commands

Once in your development environment:

make help           # Show all available commands
make dev-validate   # Validate environment setup
make test-atomic    # Run atomic tests
make test-unit      # Run unit tests
make lint          # Run linting

Services Available

When running make dev-up:


This automated message helps reviewers quickly set up the development environment.

@manavgup manavgup merged commit 096cad1 into main Oct 9, 2025
23 checks passed
@manavgup manavgup deleted the pr-05-local-dev-workflow branch October 9, 2025 02:15
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.

1 participant