Skip to content

[LP-495] 템플릿 커스텀 입력 옵션 및 포트 설정 개선#8

Merged
yessjun merged 14 commits intomainfrom
feat/LP-495-template-custom-input-option
Nov 15, 2025
Merged

[LP-495] 템플릿 커스텀 입력 옵션 및 포트 설정 개선#8
yessjun merged 14 commits intomainfrom
feat/LP-495-template-custom-input-option

Conversation

@yessjun
Copy link
Contributor

@yessjun yessjun commented Nov 14, 2025

Summary

템플릿 커스텀 입력 옵션 추가 및 포트 설정 안정성 개선

Changes

Custom Input Option Implementation

  • Python 프레임워크 앱 모듈 커스텀 입력

    • Flask, Django 등 Python 프레임워크에서 앱 모듈 경로 사용자 정의 지원
    • 기본값 제공 및 사용자 입력 허용
  • 데이터베이스 필수 인증 정보 강화

    • PostgreSQL: password 필드 필수화, superuser 필드 명확화
    • MongoDB: root credentials 필수화
    • MySQL: 공식 환경변수로 초기화 스크립트 대체
    • Redis: password 필드 필수화

Port Configuration Improvements

  • Nginx 기반 프론트엔드 템플릿 포트 설정

    • Vue.js, React, Next.js 등에 app_port 옵션 추가
    • Nginx가 프록시할 애플리케이션 포트 사용자 정의 가능
  • 불안정한 포트 옵션 제거

    • 일부 템플릿에서 문제를 일으키던 포트 옵션 제거
    • 기본 포트 설정으로 안정성 확보
  • 템플릿 포트 설명 개선

    • 각 템플릿의 포트 설정 설명 명확화
    • 사용자가 포트 설정을 이해하기 쉽게 개선

Template Configuration Guide

  • 기본 리소스 정보 추가

    • 모든 템플릿에 기본 리소스 할당 정보 추가
    • CPU, 메모리, 디스크 기본값 명시
  • 포트 설정 가이드 추가

    • 포트 설정 시 참고할 수 있는 안내 메시지 추가
    • 템플릿별 권장 포트 설정 가이드 제공

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".

Enable custom input option for build output directories and entry file paths, allowing users to specify values beyond predefined presets.

Changes:
- React template: build_output with preset options (dist, build) + custom input
- Vue.js template: build_output with preset options (dist, build) + custom input
- Express.js template: entry_file with preset options (index.js, server.js, app.js) + custom input

All modified options:
- Changed from text input to select with preset options
- Added allow_custom: true to enable "Other (Custom Input)" option
- Changed category from optional to required
- Added detailed descriptions with guidance on how to determine correct values

This prevents build failures caused by incorrect build output paths (especially for Vite vs CRA projects) and runtime failures from wrong entry file paths.

LP-495
Enable custom input option for application module paths in Python frameworks, preventing runtime failures from incorrect module configurations.

Changes:
- Django template: wsgi_module with preset options (config.wsgi:application, myproject.wsgi:application, app.wsgi:application) + custom input
- FastAPI template: app_module with preset options (main:app, app:app, api:app, src.main:app) + custom input
- Flask template: app_module with preset options (app:app, server:app, application:app, wsgi:app) + custom input

All modified options:
- Changed from text input to select with common preset options
- Added allow_custom: true to enable "Other (Custom Input)" option
- Changed category from optional to required
- Added detailed descriptions with examples of module path format

This prevents application startup failures caused by incorrect WSGI/ASGI module paths, especially common in Django and FastAPI projects with custom project structures.

LP-495
- Remove SQL init script for user creation
- Use MYSQL_USER and MYSQL_PASSWORD environment variables
- Make database_name and root_password required for security
- Rename user_username/user_password to app_username/app_password for clarity
- Update field descriptions to explain MySQL official env var behavior

LP-495
- Remove trust authentication (security vulnerability)
- Make database_name and superuser_password required
- Rename user_username/user_password to superuser_username/superuser_password
- Remove redundant postgres_password field
- Simplify template by removing conditional logic for required fields

LP-495
- Make database_name, root_username, and root_password required for security
- Rename user_username/user_password to app_username/app_password for consistency
- Keep init script for app user creation (respects MongoDB official design)
- Update field descriptions to clarify account separation

LP-495
- Make redis_password required for security
- Remove conditional logic in template (always include --requirepass)
- Add description explaining password requirement

LP-495
Add ENV PORT/SERVER_PORT to framework templates and enhance port descriptions
- Node.js frameworks (Express, NestJS, Next.js): Add ENV PORT
- Spring Boot (Java, Kotlin): Add ENV SERVER_PORT
- Express: Rename node_env to build_mode for clarity
- MongoDB: Remove unused wiredtiger_cache_size, apply mongo_port in CMD
- Spring Boot: Change build tool version to advanced category
- All frameworks: Add clear port descriptions with auto-sync mention

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

LP-495
Add configurable port option to React, Vue.js, and Static HTML templates
to enable multiple containers of the same template with different ports.

- React: Add app_port option (default: 80)
- Vue.js: Add app_port option (default: 80)
- Static HTML: Add app_port option (default: 80)
- All templates: Update Nginx listen and EXPOSE directives to use app_port
- Port auto-syncs with network configuration in frontend

Note: MySQL and PostgreSQL excluded due to potential configuration conflicts
and edge cases with official image entrypoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

LP-495
Remove app_port/port options from templates where user code or config
files can override the port setting, causing inconsistent behavior.

Removed from:
- Express.js, NestJS, Next.js: User code can hardcode ports (ENV PORT ignored)
- Spring Boot (Java/Kotlin): application.yml overrides SERVER_PORT env var
- MongoDB: mongod.conf file can override --port flag
- Redis: redis.conf file can override --port flag

Kept in Flask, Django, FastAPI: WSGI/ASGI servers have final control (100% reliable)
Kept in React, Vue, Static HTML: Nginx listen directive has final control (100% reliable)

This ensures port options only exist where they work 100% of the time,
preventing user confusion and debugging time.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

LP-495
- Add default_resources (default_cpu, default_memory, min_recommended_memory) to all 15 templates
- Remove default_ports from user-defined port templates (Express.js, NestJS, Next.js, Spring Boot, Kotlin Spring Boot)
- Add port_guide to user-defined port templates with descriptions
- Keep default_ports for app_port sync templates (Flask, Django, FastAPI, React, Vue.js, Static HTML)
- Keep default_ports for fixed port templates (MySQL, PostgreSQL, MongoDB, Redis)

LP-495
Update Redis and MongoDB test project mappings to reflect removed port options:
- Remove redis_port (now fixed at 6379)
- Remove mongo_port (now fixed at 27017)
- Add required test values for validation
- Update field names to match current templates

LP-487
@yessjun yessjun force-pushed the feat/LP-495-template-custom-input-option branch from dbd872c to 1535cb0 Compare November 14, 2025 23:47
@yessjun yessjun self-assigned this Nov 14, 2025
Fix 14 template CI failures caused by key mismatches:
- ExpressJS: node_env → build_mode (6 variants)
- React/Vue/Static-HTML: add missing app_port (7 variants)
- PostgreSQL: user_* → superuser_* (1 variant)

LP-495
- Remove template_ports from 15 template config files
- default_ports provides same functionality
- No deployment changes needed - template_ports was never used by frontend

LP-495
Reduce over-provisioned default resources to improve cost efficiency:
- Redis: CPU 500→256, Memory 512→256, min 128
- MySQL: CPU 1000→512, Memory 1024→512, min 256
- MongoDB: CPU 1000→512, Memory 1024→512, min 256
- React: CPU 500→256, Memory 256→128, min 64
- Vue.js: CPU 500→256, Memory 256→128, min 64

All values aligned to powers of 2 for cleaner configuration.
Expected 25-50% cost reduction for Free/Eco plan users.

LP-495
@yessjun yessjun merged commit de43024 into main Nov 15, 2025
1 check passed
@yessjun yessjun requested a review from ikjeong November 15, 2025 01:12
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