1
0
peddlers-of-ketran/.github/copilot-instructions.md

2.2 KiB

Do not run npm or create local node_modules in this repository

This repository is designed to run inside containers. Do NOT run npm install, npm ci, or otherwise modify node_modules or lockfiles locally on your machine. Doing so will create environment drift and can break container-based builds and CI.

Guidelines for contributors and automated assistants

  • Use the provided Docker and docker-compose workflows for development and building. The repository's Dockerfile and docker-compose.yml are the canonical way to install dependencies and run the app.

  • For development mode (hot-reload), set PRODUCTION=0 and run docker compose up -d --profile dev.

  • For production mode (static build), set PRODUCTION=1 and run docker compose up -d --profile prod.

  • For manual building of the production image, run docker compose build.

  • If you need to run a command for quick checks, use the project's container environment. Example (copy-paste):

    docker compose run --rm peddlers-of-ketran bash
    # inside container
    npm install
    npm run build
    
  • Do not suggest or perform npm install or npm ci on the host machine in repository files, PRs, or automated edits. If a change requires dependency updates, update package.json and lockfiles via a CI job or in-container run, and record the change in a PR.

Copilot / Automation specific hints

  • When editing package.json, also update the appropriate lockfile using the container workflow and include lockfile changes in the same PR.
  • If a change requires running tests or builds, prefer to add a GitHub Action that runs the command inside the standard container image rather than instructing contributors to run commands locally.

Why this matters

  • Containers provide a reproducible environment and prevent developer machines from diverging. They ensure CI and production builds are consistent.

If you need a recommended local development setup or a dev container (VS Code Remote - Containers), create a .devcontainer/ configuration and include it in the repo. That provides a supported local dev workflow that still uses containerized tooling.