Skip to content

Commit c75435d

Browse files
Copilotdannystaple
andcommitted
Update copilot instructions to reflect Docker Compose as primary development method
Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com>
1 parent 8197589 commit c75435d

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

.github/copilot-instructions.md

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,34 @@
22

33
**ALWAYS** reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
44

5-
Orionrobots is a static website about robotics using Eleventy (11ty) static site generator with Webpack for asset bundling. The site includes a blog with Jekyll-style posts, wiki pages, and robotics tutorials. It's hosted as a GitHub Pages-style site with Apache configuration.
5+
Orionrobots is a static website about robotics using Eleventy (11ty) static site generator with Webpack for asset bundling. The site includes a blog with Jekyll-style posts, wiki pages, and robotics tutorials. It's hosted on 3rd party hosting with Apache configuration.
66

77
## Working Effectively
88

99
### CRITICAL: Bootstrap and Build Commands
10-
- Bootstrap the repository:
11-
- `npm install` -- **NEVER CANCEL** - takes 1 minute. Docker npm ci is BROKEN, use npm install instead.
12-
- Build assets and site:
13-
- `npm run dist` -- builds webpack bundle.js, takes 7 seconds. Set timeout to 30+ seconds.
14-
- `npm run 11ty` -- **NEVER CANCEL** - builds full static site, takes 2.5 minutes. Set timeout to 180+ seconds.
15-
- Full development workflow:
10+
- Bootstrap and run the repository:
11+
- `docker compose up` -- **NEVER CANCEL** - builds and starts development server. Set timeout to 300+ seconds for initial build.
12+
- Build assets and site manually:
13+
- `docker compose run dist` -- builds webpack bundle.js, takes ~30 seconds
14+
- `docker compose run build` -- builds full static site, takes ~3 minutes. Set timeout to 240+ seconds.
15+
- Alternative native workflow:
1616
```bash
1717
npm install
1818
npm run dist
1919
npm run 11ty
2020
```
2121

22-
### CRITICAL: Docker Known Issues
23-
- **DO NOT USE** `docker compose up` commands - Docker npm ci fails with "Exit handler never called!" error
24-
- Docker builds timeout after 7+ minutes with npm installation issues
25-
- Use native npm commands on host instead of Docker for development
26-
2722
### Development Server
2823
- Run local development server:
29-
- `npm run serve` -- starts Eleventy dev server on port 8081, **NEVER CANCEL** - builds then watches files. Set timeout to 180+ seconds for initial build.
30-
- Alternative: After building, serve with Python: `cd _site && python3 -m http.server 8082`
24+
- `docker compose up serve` -- starts Eleventy dev server on port 8081, **NEVER CANCEL** - builds then watches files. Set timeout to 300+ seconds for initial build.
25+
- Alternative native: `npm run serve` -- starts Eleventy dev server directly
26+
- Manual serving: After building, serve with Python: `cd _site && python3 -m http.server 8082`
3127

3228
### Testing Commands
3329
- BDD integration tests:
34-
- `npm run test:bdd` or `npm test` -- runs Cucumber.js tests with Playwright
35-
- **CRITICAL**: Playwright installation often fails in CI environments
30+
- `docker compose run test` -- runs Cucumber.js tests with Playwright in containerized environment
31+
- Alternative native: `npm run test:bdd` or `npm test` -- runs tests directly on host
32+
- **Note**: Playwright installation may fail in some CI environments
3633
- Tests require a running staging server to test against
3734

3835
## Validation Scenarios
@@ -51,7 +48,8 @@ Always test these key pages that are verified in CI:
5148
- Wiki pages: `/wiki/lego` and similar (check for 404s)
5249

5350
### Build Verification
54-
- Run `npm run dist && npm run 11ty` and verify `_site` directory is created with content
51+
- Run `docker compose run dist && docker compose run build` and verify `_site` directory is created with content
52+
- Alternative native: `npm run dist && npm run 11ty`
5553
- Check that `_site/index.html` exists and contains proper HTML structure
5654
- Verify `dist/bundle.js` exists and is approximately 330KB
5755

@@ -67,7 +65,7 @@ _posts/ -- Old Jekyll posts structure
6765
_site/ -- Generated static site (build output)
6866
content/ -- Main content (blog posts, wiki pages)
6967
dist/ -- Webpack build output (bundle.js)
70-
docker-compose.yml -- BROKEN Docker setup
68+
docker-compose.yml -- Docker development environment setup
7169
package.json -- npm dependencies and scripts
7270
src/ -- Source files for Webpack
7371
webpack.config.js -- Webpack configuration
@@ -81,14 +79,16 @@ webpack.config.js -- Webpack configuration
8179
## Build Process Details
8280

8381
### Build Order (Critical)
84-
1. **Webpack Build** (`npm run dist`): Creates `dist/bundle.js` with CSS and JS assets
85-
2. **Eleventy Build** (`npm run 11ty`): Processes markdown, creates HTML, copies assets to `_site/`
82+
1. **Webpack Build** (`docker compose run dist` or `npm run dist`): Creates `dist/bundle.js` with CSS and JS assets
83+
2. **Eleventy Build** (`docker compose run build` or `npm run 11ty`): Processes markdown, creates HTML, copies assets to `_site/`
8684

8785
### Timing Expectations
88-
- npm install: ~1 minute (standard timeout OK)
89-
- webpack dist: ~7 seconds (set 30+ second timeout)
90-
- Eleventy build: ~2.5 minutes (**NEVER CANCEL** - set 180+ second timeout)
91-
- Eleventy serve: ~2.5 minutes initial build then watches (**NEVER CANCEL** - set 180+ second timeout)
86+
- Docker compose up: ~4-5 minutes for initial build and start (set 300+ second timeout)
87+
- Docker dist build: ~30 seconds (set 60+ second timeout)
88+
- Docker site build: ~3 minutes (**NEVER CANCEL** - set 240+ second timeout)
89+
- Alternative native npm install: ~1 minute (standard timeout OK)
90+
- Alternative native webpack dist: ~7 seconds (set 30+ second timeout)
91+
- Alternative native Eleventy build: ~2.5 minutes (**NEVER CANCEL** - set 180+ second timeout)
9292

9393
### Known Build Warnings
9494
- Sass deprecation warnings about @import rules (normal, build continues)
@@ -98,14 +98,14 @@ webpack.config.js -- Webpack configuration
9898
## Dependencies and Environment
9999

100100
### Required Dependencies
101-
- Node.js 20+ (tested with v20.19.4)
102-
- npm 10+ (tested with v10.8.2)
101+
- Docker and Docker Compose (primary development environment)
102+
- Node.js 20+ (for native development alternative)
103+
- npm 10+ (for native development alternative)
103104
- Python 3.12+ (for simple HTTP server testing)
104105

105106
### Optional Dependencies
106-
- Docker (BROKEN - do not rely on Docker commands)
107107
- pre-commit (for git hooks)
108-
- Playwright (for BDD testing, often fails to install)
108+
- Playwright (for BDD testing, included in Docker test environment)
109109

110110
## Configuration Files
111111

@@ -116,8 +116,8 @@ webpack.config.js -- Webpack configuration
116116
- `webpack.config.js`: Asset bundling configuration
117117

118118
### Development vs Production
119-
- Development: Use `npm run serve` for live reloading
120-
- Production: Build with `npm run dist && npm run 11ty`, serve from `_site/`
119+
- Development: Use `docker compose up serve` for live reloading, or `npm run serve` for native development
120+
- Production: Build with `docker compose run dist && docker compose run build` or `npm run dist && npm run 11ty`, serve from `_site/`
121121

122122
## Common Development Tasks
123123

@@ -133,15 +133,18 @@ This creates properly structured content with frontmatter in `content/YYYY/MM/`
133133
- Static files: Use Eleventy passthrough copy in `.eleventy.js`
134134

135135
### Troubleshooting Build Issues
136-
1. Clear `node_modules`: `rm -rf node_modules && npm install`
137-
2. Clear build outputs: `rm -rf _site dist`
138-
3. Rebuild: `npm run dist && npm run 11ty`
139-
4. **NEVER** try Docker commands - they are broken
136+
1. Clear containers and rebuild: `docker compose down && docker compose build --no-cache`
137+
2. Clear build outputs: `docker compose run --rm base rm -rf _site dist`
138+
3. Rebuild: `docker compose run dist && docker compose run build`
139+
4. Alternative native troubleshooting:
140+
- Clear `node_modules`: `rm -rf node_modules && npm install`
141+
- Clear build outputs: `rm -rf _site dist`
142+
- Rebuild: `npm run dist && npm run 11ty`
140143

141144
## CI/CD Information
142145

143146
### GitHub Workflows
144-
- **DO NOT** rely on Docker workflows - they have npm ci issues
147+
- Uses Docker Compose for consistent CI/CD environments
145148
- Staging tests run BDD Playwright tests (may be flaky)
146149
- Deployment happens to Apache hosting with htaccess rules
147150

@@ -152,11 +155,11 @@ This creates properly structured content with frontmatter in `content/YYYY/MM/`
152155

153156
## Repository Context
154157

155-
This is a long-running Jekyll-to-Eleventy migration project with:
158+
This is a Jekyll-to-Eleventy migrated project (now fully Eleventy) with:
156159
- Mixed content structure (legacy `_posts/` and new `content/`)
157160
- Jekyll-style frontmatter and Liquid templates
158161
- Bootstrap 5 + jQuery frontend
159162
- Extensive robotics content and tutorials
160163
- Apache hosting with custom htaccess rules
161164

162-
**CRITICAL REMINDER**: Docker builds are BROKEN. Always use native npm commands. Never cancel long-running builds - they can take 2.5+ minutes.
165+
**CRITICAL REMINDER**: Use Docker Compose as the primary development method. Never cancel long-running builds - they can take 3-5+ minutes for initial setup.

0 commit comments

Comments
 (0)