Skip to content

[LP-496] Add modern dependency managers (uv, Bun) support#13

Merged
yessjun merged 6 commits intomainfrom
feat/LP-496-add-modern-dependency-tools
Nov 15, 2025
Merged

[LP-496] Add modern dependency managers (uv, Bun) support#13
yessjun merged 6 commits intomainfrom
feat/LP-496-add-modern-dependency-tools

Conversation

@yessjun
Copy link
Contributor

@yessjun yessjun commented Nov 15, 2025

Summary

  • Python 프로젝트에 uv dependency manager 지원 추가
  • Node.js 프로젝트에 Bun package manager 지원 추가
  • Lock 파일 없는 프로젝트를 위한 템플릿 호환성 개선

Changes

Python uv 지원 추가

  • flask, fastapi, django 템플릿에 uv dependency manager 옵션 추가
  • uv pip install --system 사용으로 lock 파일 없이도 작동
  • 간단한 앱을 위한 패키지 빌드 요구사항 제거

Bun 지원 추가

  • nextjs, react, vuejs, expressjs, nestjs 템플릿에 Bun package manager 옵션 추가
  • --frozen-lockfile 플래그 제거로 lock 파일 없는 사용자 지원
  • Next.js Bun 실행을 위한 --bun 플래그 추가
  • Next.js 템플릿의 package.json 권한 문제 수정 (chown 추가)

테스트 프로젝트 추가

Python uv:

  • flask-uv: Flask + uv
  • fastapi-uv: FastAPI + uv
  • django-uv: Django + uv

Bun:

  • react-bun: React SPA + Bun
  • vuejs-bun: Vue.js SPA + Bun
  • nextjs-bun: Next.js + Bun runtime
  • expressjs-bun-prod-none: Express.js + Bun
  • nestjs-bun: NestJS + Bun

Technical Details

Python uv

  • pyproject.toml의 [build-system] 섹션 제거 시 dependencies만 설치
  • uv pip install --system . 사용으로 가상 환경 없이 시스템에 직접 설치
  • Poetry의 --no-root와 유사한 동작 구현

Bun

  • oven/bun:1-alpine 이미지 사용으로 자동 업데이트 지원 (1.x 범위 내)
  • Next.js는 bun --bun run start로 Bun 런타임 사용
  • Multi-stage build로 이미지 크기 최적화 유지

- 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
@yessjun yessjun requested a review from ikjeong November 15, 2025 08:41
@yessjun yessjun self-assigned this Nov 15, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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

Choose a reason for hiding this comment

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

P1 Badge 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
@yessjun yessjun merged commit 0a6def2 into main Nov 15, 2025
1 check passed
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.

1 participant