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

2.1 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.

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

    docker compose run --rm peddlers-of-ketran bash
    # inside container
    npm install
    npm run build
    
  • For lightweight commands, you can run one-off containers:

    docker run --rm -v "$PWD":/app -w /app node:20 bash -lc 'cd client && npm ci && npm run type-check'
    
  • 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.