chore: migrate build commands to poe

Signed-off-by: Tobias O <tobias.olenyi@envipath.com>
This commit is contained in:
2025-10-13 21:24:51 +13:00
parent 110fbe12c1
commit f76861a83f
2 changed files with 9 additions and 1 deletions

View File

@ -58,6 +58,8 @@ uv run poe dev
The application will be available at `http://localhost:8000`. The application will be available at `http://localhost:8000`.
**Note:** The development server automatically starts a CSS watcher (`pnpm run dev`) alongside the Django server to rebuild CSS files when changes are detected. This ensures your styles are always up-to-date during development.
#### Other useful Poe commands: #### Other useful Poe commands:
You can list all available commands by running `uv run poe --help`. You can list all available commands by running `uv run poe --help`.
@ -68,6 +70,7 @@ uv run poe db-down # Stop PostgreSQL
uv run poe migrate # Run migrations only uv run poe migrate # Run migrations only
uv run poe bootstrap # Bootstrap data only uv run poe bootstrap # Bootstrap data only
uv run poe shell # Open the Django shell uv run poe shell # Open the Django shell
uv run poe build # Build frontend assets and collect static files
uv run poe clean # Remove database volumes (WARNING: destroys all data) uv run poe clean # Remove database volumes (WARNING: destroys all data)
``` ```

View File

@ -70,7 +70,8 @@ docstring-code-format = true
[tool.poe.tasks] [tool.poe.tasks]
# Main tasks # Main tasks
setup = { sequence = ["db-up", "migrate", "bootstrap"], help = "Complete setup: start database, run migrations, and bootstrap data" } setup = { sequence = ["db-up", "migrate", "bootstrap"], help = "Complete setup: start database, run migrations, and bootstrap data" }
dev = { cmd = "python manage.py runserver", help = "Start the development server", deps = ["db-up"] } dev = { cmd = "python manage.py runserver", help = "Start the development server with CSS watcher", deps = ["db-up"] }
build = { sequence = ["build-frontend", "collectstatic"], help = "Build frontend assets and collect static files" }
# Database tasks # Database tasks
db-up = { cmd = "docker compose -f docker-compose.dev.yml up -d", help = "Start PostgreSQL database using Docker Compose" } db-up = { cmd = "docker compose -f docker-compose.dev.yml up -d", help = "Start PostgreSQL database using Docker Compose" }
@ -94,3 +95,7 @@ echo " Email: admin@envipath.com"
echo " Password: SuperSafe" echo " Password: SuperSafe"
""", help = "Bootstrap initial data (anonymous user, packages, models)" } """, help = "Bootstrap initial data (anonymous user, packages, models)" }
shell = { cmd = "python manage.py shell", help = "Open Django shell" } shell = { cmd = "python manage.py shell", help = "Open Django shell" }
# Build tasks
build-frontend = { cmd = "pnpm run build", help = "Build frontend assets using pnpm" }
collectstatic = { cmd = "python manage.py collectstatic --noinput", help = "Collect static files for production" }