aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md21
-rw-r--r--docker-compose.dev.yaml21
2 files changed, 33 insertions, 9 deletions
diff --git a/README.md b/README.md
index ad0744b..1ef1a99 100644
--- a/README.md
+++ b/README.md
@@ -134,23 +134,26 @@ Utility scripts and test wrappers are located in the `scripts/` directory:
### 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.
+If you don't have Go or Node installed locally, or prefer an isolated environment, you can use the provided `docker-compose.dev.yaml`. This avoids manual setup and works around some issues with VS Code Dev Containers in certain environments (like Antigravity + Colima).
-1. **Build the development image**:
+1. **Start the development environment**:
```bash
- docker build -t neko-dev -f .devcontainer/Dockerfile .
+ docker compose -f docker-compose.dev.yaml up -d --build
```
-2. **Run tests**:
+2. **Run tests inside the container**:
```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"
+ docker compose -f docker-compose.dev.yaml exec neko-dev bash -c "go test ./... && cd frontend && npm install && npm test"
```
-3. **Interactive shell**:
+3. **Get an interactive shell**:
```bash
- docker run -it --rm -v $(pwd):/workspace -w /workspace neko-dev bash
+ docker compose -f docker-compose.dev.yaml exec neko-dev bash
+ ```
+
+4. **Stop the environment**:
+ ```bash
+ docker compose -f docker-compose.dev.yaml down
```
# Configuration
diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml
new file mode 100644
index 0000000..036761d
--- /dev/null
+++ b/docker-compose.dev.yaml
@@ -0,0 +1,21 @@
+services:
+ neko-dev:
+ container_name: neko-dev
+ build:
+ context: .
+ dockerfile: .devcontainer/Dockerfile
+ volumes:
+ - .:/workspace
+ working_dir: /workspace
+ command: sleep infinity
+ ports:
+ # Backend
+ - "8080:8080"
+ # Frontend (Vite)
+ - "5173:5173"
+ # Optional: Range for dynamic dev tools/debuggers if needed
+ # (Uncomment if you hit port binding issues with specific tools)
+ # - "60000-65000:60000-65000"
+ # Security options to help with permission issues on some setups
+ security_opt:
+ - label=disable