# One-off tools: test, lint, fmt. Use with: docker compose -f docker-compose.tools.yml run --rm # Source is mounted so commands run against current code. # Backend: mount at /src so the image's /go module cache (from build) is not overwritten. services: backend-tools: build: context: . dockerfile: Dockerfile.tools working_dir: /src environment: GOPATH: /go GOMODCACHE: /go/pkg/mod volumes: - .:/src # Default command; override when running (e.g. go test ./..., golangci-lint run). command: ["go", "test", "./..."] frontend-tools: image: node:20-alpine working_dir: /app volumes: - ./frontend-nuxt:/app - /app/node_modules # Default command; override when running (e.g. npm test, npm run lint). command: ["npm", "test"]