Skip to content

Dockerized the project#113

Merged
Akash-nath29 merged 3 commits intomainfrom
dev
Jan 27, 2026
Merged

Dockerized the project#113
Akash-nath29 merged 3 commits intomainfrom
dev

Conversation

@Akash-nath29
Copy link
Owner

This pull request introduces support for persistent project-wide skills via a new Skills.md file, improves prompt construction logic, and adds Docker-based backend setup for easier development. The most significant changes are grouped below:

Skills.md Support and Prompt Construction:

  • Added support for loading a persistent skills prompt from Skills.md in the project directory, which is prepended to all user prompts for consistent guidance. The prompt construction logic now prioritizes: system prompt, then Skills.md, then Coderrr.md, then the user request. [1] [2] [3] [4]
  • Updated the protected paths to prevent accidental deletion of Skills.md.
  • Added comprehensive unit tests for loading Skills.md, Coderrr.md, and verifying the prompt priority order in skills.test.js.

Dockerization and Development Environment:

  • Added a Dockerfile for the backend and a docker-compose.yml to enable easy local development and hot-reloading using Docker. [1] [2]
  • Updated .dockerignore to exclude unnecessary files from Docker builds, improving build performance and security.
  • Updated README.md with instructions for running the backend using Docker as the recommended approach, while retaining manual setup steps.

Copilot AI review requested due to automatic review settings January 27, 2026 09:07
@Akash-nath29 Akash-nath29 added the ECWoC26 Project For ECWoC 26 label Jan 27, 2026
@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
coderrr-backend Ready Ready Preview, Comment Jan 27, 2026 9:07am

@github-actions
Copy link

🚀 Thanks for opening a Pull Request!

A maintainer will review this soon.

Meanwhile:
✔ Ensure tests are passing
✔ Link related issues
✔ Code follows the project guidelines

Your contribution helps make this project better!

@Akash-nath29 Akash-nath29 merged commit a9ad654 into main Jan 27, 2026
34 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces Docker support for the Coderrr backend to simplify local development setup. The PR title is "Dockerized the project" which accurately reflects the changes in the diff, though the description mentions Skills.md functionality that is not present in these changes.

Changes:

  • Added Dockerfile for the Python FastAPI backend with Python 3.11-slim base image
  • Added docker-compose.yml with development configuration including hot-reloading support
  • Added .dockerignore to exclude unnecessary files from Docker builds
  • Updated README.md with Docker setup instructions as the recommended approach

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.

File Description
backend/Dockerfile Defines the backend container image with Python 3.11, installs dependencies, and configures uvicorn to run on port 5000
docker-compose.yml Orchestrates the backend service with port mapping, volume mounts for hot-reloading, environment variable loading, and auto-restart policy
.dockerignore Excludes git files, node modules, Python cache, virtual environments, and Docker files from the build context
README.md Documents Docker as the recommended backend setup method with a simple one-command start

Comment on lines +1 to +2


Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker-compose.yml file has two empty lines at the beginning. While this doesn't affect functionality, it's unconventional and should be removed for cleaner code formatting.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +18
# Load environment variables from .env file if it exists
env_file:
- .env
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker-compose.yml file references a .env file that should be located at the repository root, but this .env file path is not documented in the README. Users following the Docker setup instructions will need to create this .env file with the appropriate backend environment variables (like GITHUB_TOKEN, GITHUB_MODELS_ENDPOINT, GITHUB_MODEL, etc.). Consider adding explicit instructions in the README about creating the root .env file from .env.example before running docker compose.

Suggested change
# Load environment variables from .env file if it exists
env_file:
- .env

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +12
volumes:
- ./backend:/app
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The volume mount ./backend:/app overrides the entire /app directory in the container, including the Python dependencies installed by the Dockerfile. This defeats the purpose of the pip install step in the Dockerfile. For development with hot-reloading to work properly, you have two options:

  1. Use a named volume for Python packages: add - backend-deps:/usr/local/lib/python3.11/site-packages to preserve installed packages
  2. Document that developers need to run pip install -r requirements.txt in their local backend/ directory

Without this, the container will fail to start because the required Python packages won't be available at runtime.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +37
# Git
.git
.gitignore

# Node
node_modules
npm-debug.log
dist
coverage

# Python
__pycache__
*.pyc
*.pyo
*.pyd
.Python
env
venv
pip-log.txt
pip-delete-this-directory.txt
.tox
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.log
.pytest_cache

# Docker
docker-compose.yml
Dockerfile
.dockerignore

# Environment
.env
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .dockerignore file is placed in the repository root, but the Docker build context in docker-compose.yml is set to ./backend. Docker will look for .dockerignore in the build context directory (backend/), not in the repository root. This .dockerignore file will not be used during the Docker build. Either move this file to the backend/ directory, or change the build context to the repository root and adjust the Dockerfile accordingly.

Copilot uses AI. Check for mistakes.
.dockerignore

# Environment
.env
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .dockerignore file excludes .env files from the Docker build, but the docker-compose.yml uses env_file: - .env to load environment variables. This creates a dependency on a .env file that must exist at the repository root. While excluding .env from the image is correct for security, users need clear documentation about creating this file. The README should include instructions to copy .env.example to .env and configure it before running docker compose.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +2


Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker-compose.yml file is missing a version specification. While Docker Compose v2+ doesn't strictly require a version field (it's optional), it's considered best practice to include it for clarity and backwards compatibility. Add version: '3.8' or version: '3.9' at the top of the file (after removing the empty lines) to explicitly declare the Compose file format version being used.

Suggested change
version: '3.9'

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +7

# Set environment variables
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description extensively discusses Skills.md support, prompt construction changes, and unit tests (mentioning files like src/agent.js, Skills.md, and skills.test.js), but none of these changes are present in the actual diff. The diff only contains Docker-related files. This creates confusion about what is actually being changed in this PR. Please update the PR description to accurately reflect only the Docker-related changes, or include the missing Skills.md-related changes in the PR if they should be part of it.

Copilot uses AI. Check for mistakes.
Comment on lines +358 to +363
#### Option A: Docker (Recommended)

```bash
docker compose up --build
```
The backend will be started at `http://localhost:5000` with hot-reloading enabled.
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Docker setup instructions are missing critical steps. Before running docker compose up --build, users need to:

  1. Create a .env file at the repository root (copy from .env.example or backend/.env.example)
  2. Configure the required environment variables (GITHUB_TOKEN, GITHUB_MODELS_ENDPOINT, GITHUB_MODEL)

Without these steps, the container will start but the backend won't be functional due to missing API credentials. Add a step before line 361 instructing users to set up the .env file.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +12
# Install system dependencies (if any needed, e.g. for build tools)
# RUN apt-get update && apt-get install -y --no-install-recommends gcc && rm -rf /var/lib/apt/lists/*
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commented line suggests that gcc might be needed for building some Python packages, but it's unclear if this is actually required. If any of the dependencies in requirements.txt need compilation (like some cryptography or data science libraries), the build will fail without these system dependencies. Either uncomment this line if build tools are needed, or remove the comment if all dependencies are pure Python packages. You can verify by testing the Docker build.

Suggested change
# Install system dependencies (if any needed, e.g. for build tools)
# RUN apt-get update && apt-get install -y --no-install-recommends gcc && rm -rf /var/lib/apt/lists/*
# Install system dependencies required for building Python packages
RUN apt-get update && apt-get install -y --no-install-recommends gcc && rm -rf /var/lib/apt/lists/*

Copilot uses AI. Check for mistakes.
- .env
# Override command to enable hot reloading for development
command: uvicorn main:app --host 0.0.0.0 --port 5000 --reload
restart: unless-stopped
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The restart policy unless-stopped is appropriate for development, but it means the container will automatically restart on system boot. For a development environment, restart: "no" or restart: on-failure might be more appropriate to avoid unnecessary resource usage when not actively developing. The current setting is more suited for production deployments.

Suggested change
restart: unless-stopped
restart: "no"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECWoC26-L3 ECWoC26 Project For ECWoC 26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments