Skip to content

chore: add justfile for local development tasks#9209

Open
zahid-arbisoft wants to merge 1 commit into
makeplane:previewfrom
zahid-arbisoft:chore/add-local-dev-justfile
Open

chore: add justfile for local development tasks#9209
zahid-arbisoft wants to merge 1 commit into
makeplane:previewfrom
zahid-arbisoft:chore/add-local-dev-justfile

Conversation

@zahid-arbisoft
Copy link
Copy Markdown

@zahid-arbisoft zahid-arbisoft commented Jun 4, 2026

Description

Adds a comprehensive justfile for local-development task runner and documents it.

  • Organizes recipes into clear sections: environment setup, Docker lifecycle, logs & status, backend (Django/api), database, frontend, and cleanup.
  • Introduces compose and settings variables so the compose-file path and Django settings module are defined once.
  • Adds recipes for everyday workflows that were previously manual: manage (arbitrary manage.py commands), makemigrations, django-shell, createsuperuser, collectstatic, dbshell, db-backup/db-restore, rebuild, up-fg, stats, and prune.
  • Every recipe is aligned with the actual docker-compose-local.yml service names and the api container's plane.settings.local module.
  • Documents the runner in README.md and CONTRIBUTING.md so contributors can discover it via just.

No application code is touched — this is dev tooling and documentation only.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

  • Run just (or just default) and confirm all recipes are listed without parse errors.
  • just setup generates .env files and installs dependencies.
  • just up builds and starts services; just ps shows them running; just down stops them.
  • just infra starts only db/redis/mq/minio.
  • just migrate applies migrations via the migrator service.
  • just manage showmigrations runs inside the api container against plane.settings.local.
  • just dbshell opens a psql session; just db-backup writes a dump and just db-restore reads it back.
  • just fe-dev starts web (:3000) and admin (:3001/god-mode); just fe-check and just fe-fix run.
  • Verify README and CONTRIBUTING render and links to the justfile resolve.

References

Summary by CodeRabbit

  • Documentation

    • Updated contribution guidelines with a tip about optionally using the repository's local development task runner for common setup and dev commands.
  • Chores

    • Added a comprehensive local development task runner to automate Docker lifecycle, database migrations/backups, Django management and shell access, frontend install/dev/build/check/fix, logs, and cleanup tasks.

Copilot AI review requested due to automatic review settings June 4, 2026 08:57
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 28adc6b5-0552-4a07-b5bb-d20da337057b

📥 Commits

Reviewing files that changed from the base of the PR and between e3bb672 and edfbebe.

📒 Files selected for processing (2)
  • CONTRIBUTING.md
  • justfile
✅ Files skipped from review due to trivial changes (1)
  • CONTRIBUTING.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • justfile

📝 Walkthrough

Walkthrough

This PR adds a justfile development task runner with recipes for Docker orchestration, monitoring, Django/backend tasks, Postgres maintenance, frontend pnpm workflows, and cleanup. CONTRIBUTING.md adds a short tip pointing contributors to the justfile.

Changes

Justfile Task Runner Addition

Layer / File(s) Summary
Justfile infrastructure and Docker lifecycle
justfile
Global variables for Docker Compose and Django settings and a default recipe. Docker lifecycle recipes: setup, up, up-fg, down, start, stop, restart, build, rebuild, and infra.
Monitoring, backend, database, and frontend recipes
justfile
Log and status inspectors (logs, worker-logs, ps, stats); Django/manage wrappers (migrate, shell, manage *args, makemigrations, django-shell, createsuperuser, collectstatic); Postgres helpers (dbshell, db-backup, db-restore); frontend pnpm tasks (fe-install, fe-dev, fe-build, fe-check, fe-fix).
Cleanup recipes and contributor documentation
justfile, CONTRIBUTING.md
Cleanup/prune recipes (clean, prune). CONTRIBUTING.md gains a tip noting the optional use of the repository justfile (e.g., just setup, just up, just fe-dev, just migrate).

🐰 A task runner hops into town,
With recipes for up and down,
Docker, Django, frontend too,
just makes development sparkle new! ✨

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding a justfile for local development tasks.
Description check ✅ Passed The description follows the template with complete sections: detailed description, type of change clearly marked, test scenarios provided, and proper formatting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a just task runner configuration to streamline local development workflows, and documents its usage for contributors.

Changes:

  • Introduced a justfile with common Docker Compose, Django management, DB ops, and frontend commands.
  • Added a tip to CONTRIBUTING.md pointing contributors to the new justfile recipes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
justfile Adds just recipes to standardize local dev commands (Docker, Django, DB, frontend).
CONTRIBUTING.md Documents the optional just-based workflow for easier onboarding.

Comment thread justfile Outdated
Comment thread justfile Outdated
Comment thread justfile Outdated
@zahid-arbisoft zahid-arbisoft force-pushed the chore/add-local-dev-justfile branch from e3bb672 to edfbebe Compare June 4, 2026 09:01
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
justfile (1)

84-85: ⚡ Quick win

Consider using /bin/sh for broader compatibility.

The shell recipe uses /bin/bash, which may not be available in Alpine-based containers. While the default service api likely has bash, users might invoke just shell plane-db (Alpine Postgres image) and encounter errors.

♻️ Proposed fix for Alpine compatibility
-# Open a shell in a running service (default: api).
+# Open a shell in a running service (default: api; Alpine containers use /bin/sh).
 shell service='api':
-    {{compose}} exec {{service}} /bin/bash
+    {{compose}} exec {{service}} /bin/sh

Alternatively, keep /bin/bash for the primary use case (api) and document the limitation in the comment.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@justfile` around lines 84 - 85, The shell recipe currently invokes /bin/bash
via the line "{{compose}} exec {{service}} /bin/bash", which fails in
Alpine-based containers; change the shell invocation to use /bin/sh (i.e.
"{{compose}} exec {{service}} /bin/sh") for broader compatibility, or implement
a simple fallback that tries /bin/bash then /bin/sh when running the shell
recipe, keeping the recipe name "shell" and the "service" variable unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@justfile`:
- Around line 84-85: The shell recipe currently invokes /bin/bash via the line
"{{compose}} exec {{service}} /bin/bash", which fails in Alpine-based
containers; change the shell invocation to use /bin/sh (i.e. "{{compose}} exec
{{service}} /bin/sh") for broader compatibility, or implement a simple fallback
that tries /bin/bash then /bin/sh when running the shell recipe, keeping the
recipe name "shell" and the "service" variable unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d5396087-3019-44ff-83c6-948178169867

📥 Commits

Reviewing files that changed from the base of the PR and between b6e47cc and e3bb672.

📒 Files selected for processing (2)
  • CONTRIBUTING.md
  • justfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants