|
| 1 | + |
| 2 | +# Copilot Project Instructions |
| 3 | + |
| 4 | +This repository contains two main areas: |
| 5 | + |
| 6 | +1. **Marp Slide Deck & Static Site** (for "The Power of Dev Containers and GitHub Codespaces") |
| 7 | +2. **.NET Aspire Sample Solution** (under `src/aspire/`) |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## 1. Marp Slide Deck & Static Site |
| 12 | + |
| 13 | +- **Source:** `slides/Slides.md` (single source of truth; always edit here) |
| 14 | +- **Assets:** `slides/img/` (images), `slides/themes/` (custom Marp CSS themes) |
| 15 | +- **Dev Containers:** `.devcontainer/slides/devcontainer.json` (authoring), `.devcontainer/codespaces/devcontainer.json` (lightweight demo) |
| 16 | +- **Build/Deploy:** `.github/workflows/marp-pages.yml` (renders Slides.md to `build/index.html` for GitHub Pages) |
| 17 | + |
| 18 | +**Editing/Rendering:** |
| 19 | +- Retain the Marp front-matter block at the top of Slides.md |
| 20 | +- Use Marp directives (theme, footer, bg, columns) for layout |
| 21 | +- Add images to `slides/img/` and reference as `img/name.png` |
| 22 | +- Prefer custom theme files over inline styles |
| 23 | + |
| 24 | +**Multi-deck:** |
| 25 | +- Add new decks as `slides/AnotherTalk.md` and update workflow to render |
| 26 | + |
| 27 | +**Local Preview:** |
| 28 | +```bash |
| 29 | +docker run --rm -v "$PWD:/work" -w /work ghcr.io/marp-team/marp-cli/marp-cli --theme-set slides/themes -o build/index.html --html slides/Slides.md |
| 30 | +``` |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +## 2. .NET Aspire Sample Solution (`src/aspire/`) |
| 35 | + |
| 36 | +**Architecture:** |
| 37 | +- `DevContainers.Aspire.AppHost/`: Orchestrator using .NET Aspire hosting model; launches and manages the web project and any future services |
| 38 | +- `DevContainers.Aspire.Web/`: Minimal ASP.NET Core API (expandable) |
| 39 | +- `DevContainers.Aspire.ServiceDefaults/`: Shared service defaults (if present) |
| 40 | + |
| 41 | +**Build/Run Workflow:** |
| 42 | +- Restore all projects: `dotnet restore` |
| 43 | +- Run orchestrator: `dotnet run --project DevContainers.Aspire.AppHost/DevContainers.Aspire.AppHost.csproj` |
| 44 | +- The AppHost will launch the Web project and any additional services |
| 45 | +- Default web endpoint: http://localhost:5087 (see console output for port) |
| 46 | + |
| 47 | +**Dev Container Usage:** |
| 48 | +- Use `.devcontainer/aspire/devcontainer.json` for Aspire development |
| 49 | +- Key tasks: |
| 50 | + - `onCreateCommand`: Installs Aspire tooling/workloads |
| 51 | + - `postStartCommand`: Trusts HTTPS dev certs (safe on Linux) |
| 52 | + - Installs .NET Dev Kit, Copilot, Copilot Chat extensions |
| 53 | +- To start: open `src/aspire/` in VS Code, run "Dev Containers: Reopen in Container", select aspire config |
| 54 | + |
| 55 | +**Docker Strategies:** |
| 56 | +- Docker-in-Docker (DinD): Full isolation, used by default for CI/Codespaces |
| 57 | +- Docker-on-Docker (DoD): Faster, shares host Docker socket; enable by mounting `/var/run/docker.sock` in devcontainer config |
| 58 | +- See `src/aspire/README.md` for tradeoffs and details |
| 59 | + |
| 60 | +**Extending:** |
| 61 | +- Add new services (e.g., databases) via AppHost project |
| 62 | +- Extend the devcontainer image as needed for extra tools |
| 63 | + |
| 64 | +**Patterns/Conventions:** |
| 65 | +- Multiple devcontainer configs under `.devcontainer/` (pattern: `.devcontainer/<name>/devcontainer.json`) |
| 66 | +- All slide content and images are managed in `slides/` (never edit `build/` directly) |
| 67 | +- Aspire solution is intentionally minimal; expand by adding new projects/services under `src/aspire/` |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## General Guidance |
| 72 | +- Keep changes tightly scoped (content vs. infra) |
| 73 | +- Never commit real secrets; placeholder secrets in devcontainer configs are for demo only |
| 74 | +- No backend/server code outside `src/aspire/` unless intentionally expanding scope |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Key References |
| 79 | +- [Dev Containers Docs](https://code.visualstudio.com/docs/devcontainers/create-dev-container) |
| 80 | +- [Aspire Docs](https://learn.microsoft.com/dotnet/aspire/overview/) |
| 81 | +- [Marp CLI](https://marp.app/) |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +Let me know if any section needs elaboration (e.g., multi-deck support, theme authoring, or extending the workflow) and I can refine further. |
0 commit comments