Simplify Docker setup and improve local development workflow#140
Simplify Docker setup and improve local development workflow#140
Conversation
README.md
Outdated
|
|
||
| ```bash | ||
| # Prerequisites: Node.js 24+, pnpm 8+ | ||
| docker compose up -d |
There was a problem hiding this comment.
docker compose up -d starts ALL services (including the app containers), which conflicts with the stated intent of running Node.js apps locally for hot reload. Having both containerized and local app instances running simultaneously would cause port conflicts.\n\nSuggested fix:\nbash\npnpm docker:db:up\npnpm install\npnpm migrate\npnpm seed\npnpm dev\n\n\nOr use docker compose up postgres -d directly (which is what pnpm docker:db:up does).
🔍 Automated Code Review
Findings
AGENTS.md Compliance
SummaryThis PR is a clean documentation and script-renaming update. The changes correctly reflect the new Docker Compose-first workflow: docker:db:up now only starts the PostgreSQL service, the README quick start uses the full docker compose up -d stack, and all three documentation files are updated consistently. Service names, ports, and hot-reload behavior were verified against docker-compose.yml and all claims are accurate. Two open inline comments from prior runs remain unresolved; no new issues were identified. 🤖 Automated review by Claude Code - View CI Run |
462437d to
04b008d
Compare
package.json
Outdated
| "docker:up": "docker-compose up -d", | ||
| "docker:down": "docker-compose down", | ||
| "docker:db:up": "docker compose up postgres -d", | ||
| "docker:db:down": "docker compose down", |
There was a problem hiding this comment.
💡 Naming: docker:db:down stops all services, not just the database
docker compose down stops and removes all containers in the compose stack (backend, frontend, nginx, postgres), but the docker:db:* namespace implies database-only operations. This is asymmetric with docker:db:up which correctly starts only the postgres service.
Suggested fix — either stop only the postgres service:
"docker:db:down": "docker compose stop postgres"Or rename to make the broader scope explicit:
"docker:down": "docker compose down"…cripts Make Docker Compose the default development path in the README with a note about hot reload support. Remove the separate Local Development section. Rename docker:up to docker:db:up to clarify they only start PostgreSQL.
04b008d to
19e9021
Compare
There was a problem hiding this comment.
Pull request overview
Refactors local development onboarding by emphasizing a Docker Compose “quick start” workflow (with nginx reverse proxy) and updating root scripts/docs to reflect the revised Docker commands.
Changes:
- Update root npm scripts to use
docker composeand add a DB-only startup script (docker:db:up). - Refresh developer docs (README, AGENTS, development guide) to reflect the new workflows and access URL (
http://localhost:8080).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Replaces legacy docker-compose usage and introduces a DB-only docker:db:up script. |
| docs/development.md | Updates documented Docker command to the new DB-only script name. |
| README.md | Revises Quick Start to use docker compose + containerized migrate/seed and notes nginx proxy URL. |
| AGENTS.md | Updates quick command reference for the new Docker script naming. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "seed": "pnpm --filter backend run seed", | ||
| "docker:up": "docker-compose up -d", | ||
| "docker:down": "docker-compose down", | ||
| "docker:db:up": "docker compose up postgres -d", |
There was a problem hiding this comment.
docker:db:up uses docker compose up postgres -d. Elsewhere in the repo the documented pattern is docker compose up -d postgres (e.g. docs/postgis-address-autocomplete.md), which also matches the canonical CLI syntax. Reordering the args will keep docs consistent and avoid edge-case parsing differences across Docker/Compose versions.
| "docker:db:up": "docker compose up postgres -d", | |
| "docker:db:up": "docker compose up -d postgres", |
| "docker:db:up": "docker compose up postgres -d", | ||
| "docker:down": "docker compose down", |
There was a problem hiding this comment.
The PR description says docker:down was renamed to docker:db:down (and docker:db is mentioned as the “db only” script), but package.json still defines docker:down and introduces docker:db:up. Either update the scripts to match the documented naming, or adjust the PR description/docs to reflect the actual script names to avoid confusion for contributors.
Summary
Refactored the Docker and development setup to provide two distinct workflows: a simplified Docker Compose-based quick start and a faster local development option with hot reload. Updated documentation and npm scripts to reflect these changes.
Key Changes
docker compose up -dwith clear instructions for database migration and optional seedingdocker:up→docker:db(more accurately reflects that it only starts PostgreSQL + PostGIS)docker:down→docker:db:down(consistent naming)docker:dbto only start thepostgresservice instead of all servicesNotable Details
http://localhost:8080https://claude.ai/code/session_01JTbjLrkLpw9qMsaLup2Kqa