diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-15 14:11:19 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-15 14:11:19 -0800 |
| commit | 9f64d3a18eb92c4845dac38265acecef2931490b (patch) | |
| tree | 28ff8444b56566a1171950b0a04988532caf693b | |
| parent | ba41f5d798a3b9d827a2025b1b02364d277072a8 (diff) | |
| download | neko-9f64d3a18eb92c4845dac38265acecef2931490b.tar.gz neko-9f64d3a18eb92c4845dac38265acecef2931490b.tar.bz2 neko-9f64d3a18eb92c4845dac38265acecef2931490b.zip | |
Add devcontainer configuration and update documentation for containerized development
| -rw-r--r-- | .devcontainer/devcontainer.json | 8 | ||||
| -rw-r--r-- | README.md | 22 |
2 files changed, 24 insertions, 6 deletions
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index af4ea12..d7ada69 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,10 @@ +// Note: This config is untested in Antigravity. Use vanilla Docker for reliability { - "name": "Neko (Podman)", + "name": "Neko (Dev)", "build": { "dockerfile": "Dockerfile", "context": ".." }, - "features": { - "ghcr.io/devcontainers/features/node:1": { - "node": "20" - } - }, "customizations": { "vscode": { "settings": { @@ -131,6 +131,28 @@ Utility scripts and test wrappers are located in the `scripts/` directory: - `scripts/run_e2e_safe.sh`: A safe wrapper for running Playwright E2E tests. - `scripts/run_e2e.sh`: Standard E2E test runner. + +### Development with Containers + +If you don't have Go or Node installed locally, or prefer an isolated environment, you can use the provided Dockerfile. Note that the `.devcontainer` VS Code integration has encountered issues with some setups (e.g. Antigravity + Colima), so manual Docker commands are recommended as a fallback. + +1. **Build the development image**: + ```bash + docker build -t neko-dev -f .devcontainer/Dockerfile . + ``` + +2. **Run tests**: + ```bash + # Runs backend tests, installs frontend deps, and runs frontend tests + docker run --rm -v $(pwd):/workspace -w /workspace neko-dev \ + bash -c "go test ./... && cd frontend && npm install && npm test" + ``` + +3. **Interactive shell**: + ```bash + docker run -it --rm -v $(pwd):/workspace -w /workspace neko-dev bash + ``` + # Configuration Everything can handled with a few command line flags. You shouldn't need to change the defaults most of the time. |
