[LP-496] Add modern dependency managers (uv, Bun) support#13
Conversation
- Add uv option to django, fastapi, flask templates - Update template.tmpl with uv installation logic - Add uv to dependency_manager options in config.json - Support pyproject.toml and uv.lock files LP-496
- Add bun option to nextjs, react, vuejs, expressjs, nestjs templates - Use oven/bun:1-alpine for latest stable 1.x version - Support bun.lockb and bun install commands - No version selection needed (auto-uses latest 1.x with backward compatibility) LP-496
Change uv installation from 'uv sync --frozen --no-dev' to 'uv pip install --system --no-cache-dir .' to support projects without uv.lock files. This makes the templates more user-friendly for simple applications that don't need a full package build. Test projects confirmed working without requiring uv.lock files or package build configuration. LP-496
Remove --frozen-lockfile flag from bun install commands to support projects without bun.lockb files. Also add --bun flag to Next.js start command and fix package.json permissions for non-root user. Changes: - Remove --frozen-lockfile from all Bun templates - Add --bun flag to Next.js CMD for proper Bun runtime execution - Add --chown=nextjs:nodejs to Next.js package.json copy Test projects confirmed working without lock files. LP-496
Add comprehensive test projects to validate template functionality: Python uv projects: - flask-uv: Flask app with uv dependency manager - fastapi-uv: FastAPI app with uv - django-uv: Django project with uv Bun projects: - react-bun: React SPA with Bun - vuejs-bun: Vue.js SPA with Bun - nextjs-bun: Next.js app with Bun runtime - expressjs-bun-prod-none: Express.js with Bun (no process manager) - nestjs-bun: NestJS app with Bun All test projects include: - pyproject.toml (Python) or package.json (Node.js) without lock files - Dockerfile generated from templates - Simple endpoint returning framework and dependency manager info Verified all projects build and run successfully with updated templates. LP-496
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| RUN bun install --production | ||
| {{ end }} | ||
|
|
||
| COPY --from=builder /app/dist ./dist |
There was a problem hiding this comment.
Run NestJS Bun image with bun, not node
The new NestJS option uses oven/bun for both the build and runtime stages, but the startup command is still CMD ["node", "dist/main"]. The bun image does not ship with the Node binary, so containers generated with package_manager = "bun" will exit immediately with node: not found. When bun is selected the command should invoke bun (e.g. bun run start or similar) instead of Node.
Useful? React with 👍 / 👎.
Change CMD from always using 'node dist/main' to conditionally using 'bun run dist/main' when package_manager is 'bun'. This ensures NestJS apps leverage the Bun runtime instead of Node.js compatibility layer. Addresses code review feedback about inconsistent runtime usage. LP-496
Summary
Changes
Python uv 지원 추가
uv pip install --system사용으로 lock 파일 없이도 작동Bun 지원 추가
--frozen-lockfile플래그 제거로 lock 파일 없는 사용자 지원--bun플래그 추가테스트 프로젝트 추가
Python uv:
Bun:
Technical Details
Python uv
[build-system]섹션 제거 시 dependencies만 설치uv pip install --system .사용으로 가상 환경 없이 시스템에 직접 설치--no-root와 유사한 동작 구현Bun
oven/bun:1-alpine이미지 사용으로 자동 업데이트 지원 (1.x 범위 내)bun --bun run start로 Bun 런타임 사용