From 817ba435eed34cf65e0f1094e34820a970094ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Fri, 14 Nov 2025 18:53:02 +0900 Subject: [PATCH 01/14] feat: add custom input option for template configurations 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 --- templates/expressjs/config.json | 14 ++++++++++---- templates/react/config.json | 13 +++++++++---- templates/vuejs/config.json | 13 +++++++++---- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/templates/expressjs/config.json b/templates/expressjs/config.json index b29151c..351c708 100644 --- a/templates/expressjs/config.json +++ b/templates/expressjs/config.json @@ -60,12 +60,18 @@ "category": "optional" }, { - "default": "index.js", "label": "진입 파일", "name": "entry_file", - "options": [], - "type": "text", - "category": "optional" + "options": [ + "index.js", + "server.js", + "app.js" + ], + "type": "select", + "category": "required", + "allow_custom": true, + "custom_label": "기타(직접 입력)", + "description": "Express 서버가 시작되는 파일명을 선택하세요. package.json의 'main' 필드나 start 스크립트를 확인하세요." }, { "default": "none", diff --git a/templates/react/config.json b/templates/react/config.json index edbb9d8..50f3a73 100644 --- a/templates/react/config.json +++ b/templates/react/config.json @@ -37,12 +37,17 @@ "category": "required" }, { - "default": "build", "label": "빌드 출력 디렉토리", "name": "build_output", - "options": [], - "type": "text", - "category": "optional" + "options": [ + "dist", + "build" + ], + "type": "select", + "category": "required", + "allow_custom": true, + "custom_label": "기타(직접 입력)", + "description": "프로젝트의 빌드 출력 디렉토리를 선택하세요. Vite는 'dist', Create React App은 'build'를 사용합니다. vite.config.js 또는 package.json을 확인하세요." } ], "template_ports": [ diff --git a/templates/vuejs/config.json b/templates/vuejs/config.json index 858ccd3..d731181 100644 --- a/templates/vuejs/config.json +++ b/templates/vuejs/config.json @@ -37,12 +37,17 @@ "category": "required" }, { - "default": "dist", "label": "빌드 출력 디렉토리", "name": "build_output", - "options": [], - "type": "text", - "category": "optional" + "options": [ + "dist", + "build" + ], + "type": "select", + "category": "required", + "allow_custom": true, + "custom_label": "기타(직접 입력)", + "description": "프로젝트의 빌드 출력 디렉토리를 선택하세요. 대부분의 Vue 프로젝트는 'dist'를 사용합니다. vite.config.js 또는 vue.config.js를 확인하세요." } ], "template_ports": [ From 156c3d44b7cf40495bdb2e4f71048ab87a043b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 01:24:47 +0900 Subject: [PATCH 02/14] feat: add custom input for Python framework app modules 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 --- templates/django/config.json | 14 ++++++++++---- templates/fastapi/config.json | 15 +++++++++++---- templates/flask/config.json | 15 +++++++++++---- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/templates/django/config.json b/templates/django/config.json index d3a4cc3..fe08b15 100644 --- a/templates/django/config.json +++ b/templates/django/config.json @@ -50,12 +50,18 @@ "category": "optional" }, { - "default": "config.wsgi:application", "label": "WSGI 모듈", "name": "wsgi_module", - "options": [], - "type": "text", - "category": "optional" + "options": [ + "config.wsgi:application", + "myproject.wsgi:application", + "app.wsgi:application" + ], + "type": "select", + "category": "required", + "allow_custom": true, + "custom_label": "기타(직접 입력)", + "description": "Django 프로젝트의 WSGI 모듈 경로를 선택하세요. settings.py가 있는 디렉토리의 wsgi.py를 찾아 '디렉토리명.wsgi:application' 형식으로 입력합니다." }, { "default": "gunicorn", diff --git a/templates/fastapi/config.json b/templates/fastapi/config.json index 15badfc..9257f16 100644 --- a/templates/fastapi/config.json +++ b/templates/fastapi/config.json @@ -50,12 +50,19 @@ "category": "optional" }, { - "default": "main:app", "label": "애플리케이션 모듈", "name": "app_module", - "options": [], - "type": "text", - "category": "optional" + "options": [ + "main:app", + "app:app", + "api:app", + "src.main:app" + ], + "type": "select", + "category": "required", + "allow_custom": true, + "custom_label": "기타(직접 입력)", + "description": "FastAPI 앱 객체의 위치를 선택하세요. 예: main.py에 app = FastAPI()가 있으면 'main:app', src/api/app.py에 있으면 'src.api.app:app'" }, { "default": "uvicorn", diff --git a/templates/flask/config.json b/templates/flask/config.json index f67372a..f85c9d1 100644 --- a/templates/flask/config.json +++ b/templates/flask/config.json @@ -50,12 +50,19 @@ "category": "optional" }, { - "default": "app:app", "label": "애플리케이션 모듈", "name": "app_module", - "options": [], - "type": "text", - "category": "optional" + "options": [ + "app:app", + "server:app", + "application:app", + "wsgi:app" + ], + "type": "select", + "category": "required", + "allow_custom": true, + "custom_label": "기타(직접 입력)", + "description": "Flask 앱 객체의 위치를 선택하세요. 예: app.py에 app = Flask(__name__)가 있으면 'app:app', server.py에 있으면 'server:app'" }, { "default": "gunicorn", From 82a741400bfc23eb5cf09d16401d71d7cdf0ae14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 02:13:30 +0900 Subject: [PATCH 03/14] refactor: replace MySQL init script with official environment variables - 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 --- templates/mysql/config.json | 33 ++++++++++++++++++--------------- templates/mysql/template.tmpl | 7 +++---- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/templates/mysql/config.json b/templates/mysql/config.json index 692a9fc..2ec8383 100644 --- a/templates/mysql/config.json +++ b/templates/mysql/config.json @@ -40,37 +40,40 @@ "type": "select", "category": "required" }, - { - "default": "", - "label": "Root 비밀번호", - "name": "root_password", - "options": [], - "type": "password", - "category": "required" - }, { "default": "", "label": "데이터베이스명", "name": "database_name", "options": [], "type": "text", - "category": "optional" + "category": "required", + "description": "초기 생성할 데이터베이스명. MYSQL_DATABASE 환경변수로 설정됩니다." + }, + { + "label": "Root 비밀번호", + "name": "root_password", + "options": [], + "type": "password", + "category": "required", + "description": "MySQL root 계정 비밀번호. 보안을 위해 필수로 설정해야 합니다." }, { "default": "", - "label": "애플리케이션 사용자명", - "name": "user_username", + "label": "애플리케이션 사용자명 (선택사항)", + "name": "app_username", "options": [], "type": "text", - "category": "optional" + "category": "optional", + "description": "애플리케이션용 별도 계정명. 설정 시 비밀번호도 함께 입력해야 합니다." }, { "default": "", - "label": "애플리케이션 비밀번호", - "name": "user_password", + "label": "애플리케이션 비밀번호 (선택사항)", + "name": "app_password", "options": [], "type": "password", - "category": "optional" + "category": "optional", + "description": "애플리케이션 계정의 비밀번호. 사용자명과 함께 설정 시 해당 데이터베이스에 대한 전체 권한이 부여됩니다." }, { "default": "151", diff --git a/templates/mysql/template.tmpl b/templates/mysql/template.tmpl index 34dea0b..2a4b92b 100644 --- a/templates/mysql/template.tmpl +++ b/templates/mysql/template.tmpl @@ -16,10 +16,9 @@ RUN echo "[mysqld]" > /etc/mysql/conf.d/custom.cnf && \ echo "innodb_buffer_pool_size={{ .innodb_buffer_pool_size }}" >> /etc/mysql/conf.d/custom.cnf{{ end }}{{ if .max_allowed_packet }} && \ echo "max_allowed_packet={{ .max_allowed_packet }}" >> /etc/mysql/conf.d/custom.cnf{{ end }} -{{ if and .database_name .user_username .user_password -}} -RUN echo "CREATE USER IF NOT EXISTS '{{ .user_username }}'@'%' IDENTIFIED BY '{{ .user_password }}';" > /docker-entrypoint-initdb.d/01-create-user.sql && \ - echo "GRANT ALL PRIVILEGES ON \`{{ .database_name }}\`.* TO '{{ .user_username }}'@'%';" >> /docker-entrypoint-initdb.d/01-create-user.sql && \ - echo "FLUSH PRIVILEGES;" >> /docker-entrypoint-initdb.d/01-create-user.sql +{{ if and .app_username .app_password -}} +ENV MYSQL_USER={{ .app_username }} +ENV MYSQL_PASSWORD={{ .app_password }} {{- end }} EXPOSE 3306 From ccb2b2336384436d3e4947b6162efea972d92842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 02:13:39 +0900 Subject: [PATCH 04/14] refactor: make PostgreSQL password required and clarify superuser fields - 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 --- templates/postgresql/config.json | 28 +++++++++++----------------- templates/postgresql/template.tmpl | 18 ++++-------------- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/templates/postgresql/config.json b/templates/postgresql/config.json index 1dcdcb9..ff76e04 100644 --- a/templates/postgresql/config.json +++ b/templates/postgresql/config.json @@ -33,37 +33,31 @@ "type": "select", "category": "required" }, - { - "default": "", - "label": "PostgreSQL Root 비밀번호", - "name": "postgres_password", - "options": [], - "type": "password", - "category": "required" - }, { "default": "", "label": "데이터베이스명", "name": "database_name", "options": [], "type": "text", - "category": "optional" + "category": "required", + "description": "초기 생성할 데이터베이스명. POSTGRES_DB 환경변수로 설정됩니다." }, { - "default": "", - "label": "사용자명", - "name": "user_username", + "default": "postgres", + "label": "Superuser 이름", + "name": "superuser_username", "options": [], "type": "text", - "category": "optional" + "category": "required", + "description": "PostgreSQL superuser 계정명. 기본값은 'postgres'입니다." }, { - "default": "", - "label": "비밀번호", - "name": "user_password", + "label": "Superuser 비밀번호", + "name": "superuser_password", "options": [], "type": "password", - "category": "optional" + "category": "required", + "description": "PostgreSQL superuser 계정 비밀번호. 보안을 위해 필수로 설정해야 합니다." }, { "default": "100", diff --git a/templates/postgresql/template.tmpl b/templates/postgresql/template.tmpl index a4c6797..a137a96 100644 --- a/templates/postgresql/template.tmpl +++ b/templates/postgresql/template.tmpl @@ -1,20 +1,10 @@ FROM postgres:{{ .version }} -{{ if .database_name -}} ENV POSTGRES_DB={{ .database_name }} -{{- end }} -{{ if .user_username -}} -ENV POSTGRES_USER={{ .user_username }} -{{- end }} -{{ if .user_password -}} -ENV POSTGRES_PASSWORD={{ .user_password }} -{{- else if .postgres_password -}} -ENV POSTGRES_PASSWORD={{ .postgres_password }} -{{- else -}} -ENV POSTGRES_HOST_AUTH_METHOD=trust -{{- end }} -ENV POSTGRES_MAX_CONNECTIONS={{ if .max_connections }}{{ .max_connections }}{{ else }}100{{ end }} -ENV POSTGRES_SHARED_BUFFERS={{ if .shared_buffers }}{{ .shared_buffers }}{{ else }}128MB{{ end }} +ENV POSTGRES_USER={{ .superuser_username }} +ENV POSTGRES_PASSWORD={{ .superuser_password }} +ENV POSTGRES_MAX_CONNECTIONS={{ .max_connections }} +ENV POSTGRES_SHARED_BUFFERS={{ .shared_buffers }} RUN echo "max_connections = $POSTGRES_MAX_CONNECTIONS" >> /usr/share/postgresql/postgresql.conf.sample && \ echo "shared_buffers = $POSTGRES_SHARED_BUFFERS" >> /usr/share/postgresql/postgresql.conf.sample{{ if .effective_cache_size }} && \ From 1d835fcd1ba86a98b31c2ac0def905bb561cc0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 02:13:47 +0900 Subject: [PATCH 05/14] refactor: make MongoDB root credentials required - 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 --- templates/mongodb/config.json | 27 +++++++++++++++------------ templates/mongodb/template.tmpl | 8 ++------ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/templates/mongodb/config.json b/templates/mongodb/config.json index e1c97fe..ec6dcc6 100644 --- a/templates/mongodb/config.json +++ b/templates/mongodb/config.json @@ -36,44 +36,47 @@ "category": "optional" }, { - "default": "", "label": "데이터베이스명", "name": "database_name", "options": [], "type": "text", - "category": "optional" + "category": "required", + "description": "초기 생성할 데이터베이스명. MONGO_INITDB_DATABASE 환경변수로 설정됩니다." }, { - "default": "", + "default": "admin", "label": "Root 사용자명", "name": "root_username", "options": [], "type": "text", - "category": "optional" + "category": "required", + "description": "MongoDB root 계정명. 기본값은 'admin'입니다." }, { - "default": "", "label": "Root 비밀번호", "name": "root_password", "options": [], "type": "password", - "category": "optional" + "category": "required", + "description": "MongoDB root 계정 비밀번호. 보안을 위해 필수로 설정해야 합니다." }, { "default": "", - "label": "애플리케이션 사용자명", - "name": "user_username", + "label": "애플리케이션 사용자명 (선택사항)", + "name": "app_username", "options": [], "type": "text", - "category": "optional" + "category": "optional", + "description": "애플리케이션용 별도 계정명. 설정 시 비밀번호도 함께 입력해야 하며, 지정된 데이터베이스에 대한 읽기/쓰기 권한이 부여됩니다." }, { "default": "", - "label": "애플리케이션 비밀번호", - "name": "user_password", + "label": "애플리케이션 비밀번호 (선택사항)", + "name": "app_password", "options": [], "type": "password", - "category": "optional" + "category": "optional", + "description": "애플리케이션 계정의 비밀번호. 사용자명과 함께 설정 시 Init 스크립트를 통해 계정이 생성됩니다." }, { "default": "1GB", diff --git a/templates/mongodb/template.tmpl b/templates/mongodb/template.tmpl index ddd8533..1b8b50c 100644 --- a/templates/mongodb/template.tmpl +++ b/templates/mongodb/template.tmpl @@ -1,15 +1,11 @@ FROM mongo:{{ .mongo_version }} -{{ if and .root_username .root_password -}} ENV MONGO_INITDB_ROOT_USERNAME={{ .root_username }} ENV MONGO_INITDB_ROOT_PASSWORD={{ .root_password }} -{{- end }} -{{ if .database_name -}} ENV MONGO_INITDB_DATABASE={{ .database_name }} -{{- end }} -{{ if and .database_name .user_username .user_password -}} -RUN echo 'db.getSiblingDB("{{ .database_name }}").createUser({user: "{{ .user_username }}", pwd: "{{ .user_password }}", roles: [{role: "readWrite", db: "{{ .database_name }}"}]})' > /docker-entrypoint-initdb.d/01-create-user.js +{{ if and .app_username .app_password -}} +RUN echo 'db.getSiblingDB("{{ .database_name }}").createUser({user: "{{ .app_username }}", pwd: "{{ .app_password }}", roles: [{role: "readWrite", db: "{{ .database_name }}"}]})' > /docker-entrypoint-initdb.d/01-create-user.js {{- end }} EXPOSE {{ .mongo_port }} From caa768f5bf95ef9ee66032fea118c97171d360ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 02:13:53 +0900 Subject: [PATCH 06/14] refactor: make Redis password required - Make redis_password required for security - Remove conditional logic in template (always include --requirepass) - Add description explaining password requirement LP-495 --- templates/redis/config.json | 4 ++-- templates/redis/template.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/redis/config.json b/templates/redis/config.json index ac276ea..58fc0f3 100644 --- a/templates/redis/config.json +++ b/templates/redis/config.json @@ -32,12 +32,12 @@ "category": "optional" }, { - "default": "", "label": "Redis 비밀번호", "name": "redis_password", "options": [], "type": "password", - "category": "optional" + "category": "required", + "description": "Redis 접근 비밀번호. 보안을 위해 필수로 설정해야 합니다." }, { "default": "", diff --git a/templates/redis/template.tmpl b/templates/redis/template.tmpl index f949520..4d35e13 100644 --- a/templates/redis/template.tmpl +++ b/templates/redis/template.tmpl @@ -4,4 +4,4 @@ EXPOSE {{ .redis_port }} VOLUME ["/data"] -CMD ["redis-server", "--port", "{{ .redis_port }}", "--appendonly", "yes"{{ if .redis_password }}, "--requirepass", "{{ .redis_password }}"{{ end }}{{ if .maxmemory }}, "--maxmemory", "{{ .maxmemory }}"{{ end }}{{ if .maxmemory_policy }}, "--maxmemory-policy", "{{ .maxmemory_policy }}"{{ end }}] \ No newline at end of file +CMD ["redis-server", "--port", "{{ .redis_port }}", "--appendonly", "yes", "--requirepass", "{{ .redis_password }}"{{ if .maxmemory }}, "--maxmemory", "{{ .maxmemory }}"{{ end }}{{ if .maxmemory_policy }}, "--maxmemory-policy", "{{ .maxmemory_policy }}"{{ end }}] \ No newline at end of file From dfdb0f17c6fbd5e8e37125c327347c4f4a8d85f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 03:06:28 +0900 Subject: [PATCH 07/14] feat: improve template port configuration and descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 LP-495 --- templates/django/config.json | 3 ++- templates/expressjs/config.json | 14 ++++++-------- templates/expressjs/template.tmpl | 5 ++++- templates/fastapi/config.json | 7 ++----- templates/flask/config.json | 3 ++- templates/kotlin-spring-boot/config.json | 6 ++++-- templates/kotlin-spring-boot/template.tmpl | 5 +++-- templates/mongodb/config.json | 12 ++---------- templates/mongodb/template.tmpl | 4 +++- templates/nestjs/config.json | 7 ++----- templates/nestjs/template.tmpl | 2 ++ templates/nextjs/config.json | 7 ++----- templates/nextjs/template.tmpl | 2 ++ templates/spring-boot/config.json | 16 +++++++--------- templates/spring-boot/template.tmpl | 5 +++-- 15 files changed, 46 insertions(+), 52 deletions(-) diff --git a/templates/django/config.json b/templates/django/config.json index fe08b15..b7f1d9b 100644 --- a/templates/django/config.json +++ b/templates/django/config.json @@ -47,7 +47,8 @@ "name": "app_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "Django 서버가 실행될 포트 번호. WSGI 서버 실행 시 이 포트로 바인딩되며, 네트워크 포트와 자동으로 동기화됩니다." }, { "label": "WSGI 모듈", diff --git a/templates/expressjs/config.json b/templates/expressjs/config.json index 351c708..476b25b 100644 --- a/templates/expressjs/config.json +++ b/templates/expressjs/config.json @@ -3,10 +3,6 @@ { "key": "NODE_ENV", "value": "production" - }, - { - "key": "PORT", - "value": "3000" } ], "default_ports": [ @@ -42,14 +38,15 @@ }, { "default": "production", - "label": "Node 환경", - "name": "node_env", + "label": "빌드 모드", + "name": "build_mode", "options": [ "development", "production" ], "type": "select", - "category": "optional" + "category": "optional", + "description": "의존성 설치 모드. production: 프로덕션 의존성만 설치, development: 모든 의존성 설치 (devDependencies 포함)" }, { "default": "3000", @@ -57,7 +54,8 @@ "name": "app_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "Express 서버가 실행될 포트 번호. 이 값은 환경변수 PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." }, { "label": "진입 파일", diff --git a/templates/expressjs/template.tmpl b/templates/expressjs/template.tmpl index e32503a..d4cfb66 100644 --- a/templates/expressjs/template.tmpl +++ b/templates/expressjs/template.tmpl @@ -11,7 +11,7 @@ COPY package.json pnpm-lock.yaml* ./ RUN npm install -g pnpm {{ end }} -{{ if eq .node_env "production" }} +{{ if eq .build_mode "production" }} {{ if eq .package_manager "npm" }} RUN npm install --only=production --no-audit --prefer-offline {{ else if eq .package_manager "yarn" }} @@ -37,6 +37,9 @@ RUN npm install -g nodemon COPY . . +ENV PORT={{ .app_port }} +ENV NODE_ENV={{ .build_mode }} + EXPOSE {{ .app_port }} {{ if eq .process_manager "pm2" }} diff --git a/templates/fastapi/config.json b/templates/fastapi/config.json index 9257f16..0f2d8eb 100644 --- a/templates/fastapi/config.json +++ b/templates/fastapi/config.json @@ -3,10 +3,6 @@ { "key": "PYTHONUNBUFFERED", "value": "1" - }, - { - "key": "PORT", - "value": "8000" } ], "default_ports": [ @@ -47,7 +43,8 @@ "name": "app_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "FastAPI 서버가 실행될 포트 번호. ASGI 서버 실행 시 이 포트로 바인딩되며, 네트워크 포트와 자동으로 동기화됩니다." }, { "label": "애플리케이션 모듈", diff --git a/templates/flask/config.json b/templates/flask/config.json index f85c9d1..3f75ddb 100644 --- a/templates/flask/config.json +++ b/templates/flask/config.json @@ -47,7 +47,8 @@ "name": "app_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "Flask 서버가 실행될 포트 번호. WSGI 서버 실행 시 이 포트로 바인딩되며, 네트워크 포트와 자동으로 동기화됩니다." }, { "label": "애플리케이션 모듈", diff --git a/templates/kotlin-spring-boot/config.json b/templates/kotlin-spring-boot/config.json index f485d17..b60d355 100644 --- a/templates/kotlin-spring-boot/config.json +++ b/templates/kotlin-spring-boot/config.json @@ -26,7 +26,8 @@ "8.5" ], "type": "select", - "category": "required" + "category": "advanced", + "description": "Gradle 빌드 도구 버전. 특별한 이유가 없다면 기본값 사용을 권장합니다." }, { "default": "prod", @@ -46,7 +47,8 @@ "name": "app_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "Spring Boot 서버가 실행될 포트 번호. 이 값은 환경변수 SERVER_PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/kotlin-spring-boot/template.tmpl b/templates/kotlin-spring-boot/template.tmpl index 8c18e09..3355496 100644 --- a/templates/kotlin-spring-boot/template.tmpl +++ b/templates/kotlin-spring-boot/template.tmpl @@ -24,9 +24,10 @@ RUN chown spring:spring app.jar USER spring -EXPOSE {{ .app_port }} - +ENV SERVER_PORT={{ .app_port }} ENV SPRING_PROFILES_ACTIVE={{ .spring_profile }} + +EXPOSE {{ .app_port }} ENV JAVA_OPTS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0" CMD ["sh", "-c", "java $JAVA_OPTS -jar app.jar"] \ No newline at end of file diff --git a/templates/mongodb/config.json b/templates/mongodb/config.json index ec6dcc6..42cf7b9 100644 --- a/templates/mongodb/config.json +++ b/templates/mongodb/config.json @@ -33,7 +33,8 @@ "name": "mongo_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "MongoDB가 실행될 포트 번호입니다. 기본값은 27017입니다." }, { "label": "데이터베이스명", @@ -77,15 +78,6 @@ "type": "password", "category": "optional", "description": "애플리케이션 계정의 비밀번호. 사용자명과 함께 설정 시 Init 스크립트를 통해 계정이 생성됩니다." - }, - { - "default": "1GB", - "label": "WiredTiger 캐시 크기", - "name": "wiredtiger_cache_size", - "options": [], - "type": "text", - "category": "advanced", - "description": "WiredTiger 스토리지 엔진의 캐시 크기. 전체 메모리의 50% 권장." } ], "template_ports": [ diff --git a/templates/mongodb/template.tmpl b/templates/mongodb/template.tmpl index 1b8b50c..e024d90 100644 --- a/templates/mongodb/template.tmpl +++ b/templates/mongodb/template.tmpl @@ -10,4 +10,6 @@ RUN echo 'db.getSiblingDB("{{ .database_name }}").createUser({user: "{{ .app_use EXPOSE {{ .mongo_port }} -VOLUME ["/data/db", "/data/configdb"] \ No newline at end of file +VOLUME ["/data/db", "/data/configdb"] + +CMD ["mongod", "--port", "{{ .mongo_port }}"] \ No newline at end of file diff --git a/templates/nestjs/config.json b/templates/nestjs/config.json index da55aaf..71b2526 100644 --- a/templates/nestjs/config.json +++ b/templates/nestjs/config.json @@ -3,10 +3,6 @@ { "key": "NODE_ENV", "value": "production" - }, - { - "key": "PORT", - "value": "3000" } ], "default_ports": [ @@ -46,7 +42,8 @@ "name": "app_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "NestJS 서버가 실행될 포트 번호. 이 값은 환경변수 PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/nestjs/template.tmpl b/templates/nestjs/template.tmpl index 541bb07..6bf8697 100644 --- a/templates/nestjs/template.tmpl +++ b/templates/nestjs/template.tmpl @@ -40,6 +40,8 @@ RUN npm install -g pnpm && pnpm install --prod COPY --from=builder /app/dist ./dist +ENV PORT={{ .app_port }} + EXPOSE {{ .app_port }} CMD ["node", "dist/main"] \ No newline at end of file diff --git a/templates/nextjs/config.json b/templates/nextjs/config.json index baa60c5..9088009 100644 --- a/templates/nextjs/config.json +++ b/templates/nextjs/config.json @@ -3,10 +3,6 @@ { "key": "NODE_ENV", "value": "production" - }, - { - "key": "PORT", - "value": "3000" } ], "default_ports": [ @@ -46,7 +42,8 @@ "name": "app_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "Next.js 서버가 실행될 포트 번호. 이 값은 환경변수 PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/nextjs/template.tmpl b/templates/nextjs/template.tmpl index 349edda..81a7764 100644 --- a/templates/nextjs/template.tmpl +++ b/templates/nextjs/template.tmpl @@ -54,6 +54,8 @@ COPY --from=builder /app/package.json ./package.json USER nextjs +ENV PORT={{ .app_port }} + EXPOSE {{ .app_port }} {{ if eq .package_manager "npm" }} diff --git a/templates/spring-boot/config.json b/templates/spring-boot/config.json index 5627e94..22da86d 100644 --- a/templates/spring-boot/config.json +++ b/templates/spring-boot/config.json @@ -1,10 +1,5 @@ { - "default_env": [ - { - "key": "SERVER_PORT", - "value": "8080" - } - ], + "default_env": [], "default_ports": [ { "internal_port": 8080, @@ -42,7 +37,8 @@ "3.9" ], "type": "select", - "category": "required" + "category": "advanced", + "description": "Maven 빌드 도구 버전. 특별한 이유가 없다면 기본값 사용을 권장합니다." }, { "default": "8.5", @@ -52,7 +48,8 @@ "8.5" ], "type": "select", - "category": "required" + "category": "advanced", + "description": "Gradle 빌드 도구 버전. 특별한 이유가 없다면 기본값 사용을 권장합니다." }, { "default": "prod", @@ -72,7 +69,8 @@ "name": "app_port", "options": [], "type": "number", - "category": "optional" + "category": "optional", + "description": "Spring Boot 서버가 실행될 포트 번호. 이 값은 환경변수 SERVER_PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/spring-boot/template.tmpl b/templates/spring-boot/template.tmpl index 6ee14e6..64c93da 100644 --- a/templates/spring-boot/template.tmpl +++ b/templates/spring-boot/template.tmpl @@ -33,9 +33,10 @@ RUN chown spring:spring app.jar USER spring -EXPOSE {{ .app_port }} - +ENV SERVER_PORT={{ .app_port }} ENV SPRING_PROFILES_ACTIVE={{ .spring_profile }} + +EXPOSE {{ .app_port }} ENV JAVA_OPTS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -XX:InitialRAMPercentage=50.0" HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ From d033d9119b6c1773e75f5d7ac738982768becf7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 03:20:38 +0900 Subject: [PATCH 08/14] feat: add app_port option to Nginx-based frontend templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 LP-495 --- templates/react/config.json | 9 +++++++++ templates/react/template.tmpl | 4 ++-- templates/static-html/config.json | 9 +++++++++ templates/static-html/template.tmpl | 4 ++-- templates/vuejs/config.json | 9 +++++++++ templates/vuejs/template.tmpl | 4 ++-- 6 files changed, 33 insertions(+), 6 deletions(-) diff --git a/templates/react/config.json b/templates/react/config.json index 50f3a73..aad706d 100644 --- a/templates/react/config.json +++ b/templates/react/config.json @@ -48,6 +48,15 @@ "allow_custom": true, "custom_label": "기타(직접 입력)", "description": "프로젝트의 빌드 출력 디렉토리를 선택하세요. Vite는 'dist', Create React App은 'build'를 사용합니다. vite.config.js 또는 package.json을 확인하세요." + }, + { + "default": "80", + "label": "애플리케이션 포트", + "name": "app_port", + "options": [], + "type": "number", + "category": "optional", + "description": "Nginx 서버가 실행될 포트 번호. 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/react/template.tmpl b/templates/react/template.tmpl index f5d2092..9138fc8 100644 --- a/templates/react/template.tmpl +++ b/templates/react/template.tmpl @@ -28,7 +28,7 @@ FROM nginx:alpine COPY --from=builder /app/{{ .build_output }} /usr/share/nginx/html RUN echo 'server { \ - listen 80; \ + listen {{ .app_port }}; \ location / { \ root /usr/share/nginx/html; \ index index.html; \ @@ -36,6 +36,6 @@ RUN echo 'server { \ } \ }' > /etc/nginx/conf.d/default.conf -EXPOSE 80 +EXPOSE {{ .app_port }} CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/templates/static-html/config.json b/templates/static-html/config.json index 553d222..40d9f45 100644 --- a/templates/static-html/config.json +++ b/templates/static-html/config.json @@ -17,6 +17,15 @@ ], "type": "select", "category": "required" + }, + { + "default": "80", + "label": "애플리케이션 포트", + "name": "app_port", + "options": [], + "type": "number", + "category": "optional", + "description": "Nginx 서버가 실행될 포트 번호. 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/static-html/template.tmpl b/templates/static-html/template.tmpl index d248d74..459436f 100644 --- a/templates/static-html/template.tmpl +++ b/templates/static-html/template.tmpl @@ -3,13 +3,13 @@ FROM nginx:{{ .nginx_version }}-alpine COPY . /usr/share/nginx/html RUN echo 'server { \ - listen 80; \ + listen {{ .app_port }}; \ location / { \ root /usr/share/nginx/html; \ index index.html index.htm; \ } \ }' > /etc/nginx/conf.d/default.conf -EXPOSE 80 +EXPOSE {{ .app_port }} CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/templates/vuejs/config.json b/templates/vuejs/config.json index d731181..8425f62 100644 --- a/templates/vuejs/config.json +++ b/templates/vuejs/config.json @@ -48,6 +48,15 @@ "allow_custom": true, "custom_label": "기타(직접 입력)", "description": "프로젝트의 빌드 출력 디렉토리를 선택하세요. 대부분의 Vue 프로젝트는 'dist'를 사용합니다. vite.config.js 또는 vue.config.js를 확인하세요." + }, + { + "default": "80", + "label": "애플리케이션 포트", + "name": "app_port", + "options": [], + "type": "number", + "category": "optional", + "description": "Nginx 서버가 실행될 포트 번호. 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/vuejs/template.tmpl b/templates/vuejs/template.tmpl index 1bf1b7e..05c7a38 100644 --- a/templates/vuejs/template.tmpl +++ b/templates/vuejs/template.tmpl @@ -27,7 +27,7 @@ FROM nginx:alpine COPY --from=builder /app/{{ .build_output }} /usr/share/nginx/html RUN echo 'server { \ - listen 80; \ + listen {{ .app_port }}; \ location / { \ root /usr/share/nginx/html; \ index index.html; \ @@ -35,6 +35,6 @@ RUN echo 'server { \ } \ }' > /etc/nginx/conf.d/default.conf -EXPOSE 80 +EXPOSE {{ .app_port }} CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file From b6e96755332d0ff4b11e3bb815a1c5a2977c3150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 07:04:00 +0900 Subject: [PATCH 09/14] refactor: remove unreliable port options from templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 LP-495 --- templates/expressjs/config.json | 9 --------- templates/expressjs/template.tmpl | 3 +-- templates/kotlin-spring-boot/config.json | 9 --------- templates/kotlin-spring-boot/template.tmpl | 5 ++--- templates/mongodb/config.json | 9 --------- templates/mongodb/template.tmpl | 6 ++---- templates/nestjs/config.json | 9 --------- templates/nestjs/template.tmpl | 4 +--- templates/nextjs/config.json | 9 --------- templates/nextjs/template.tmpl | 4 +--- templates/redis/config.json | 8 -------- templates/redis/template.tmpl | 4 ++-- templates/spring-boot/config.json | 9 --------- templates/spring-boot/template.tmpl | 7 +++---- 14 files changed, 12 insertions(+), 83 deletions(-) diff --git a/templates/expressjs/config.json b/templates/expressjs/config.json index 476b25b..5ecd2c7 100644 --- a/templates/expressjs/config.json +++ b/templates/expressjs/config.json @@ -48,15 +48,6 @@ "category": "optional", "description": "의존성 설치 모드. production: 프로덕션 의존성만 설치, development: 모든 의존성 설치 (devDependencies 포함)" }, - { - "default": "3000", - "label": "애플리케이션 포트", - "name": "app_port", - "options": [], - "type": "number", - "category": "optional", - "description": "Express 서버가 실행될 포트 번호. 이 값은 환경변수 PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." - }, { "label": "진입 파일", "name": "entry_file", diff --git a/templates/expressjs/template.tmpl b/templates/expressjs/template.tmpl index d4cfb66..128cb61 100644 --- a/templates/expressjs/template.tmpl +++ b/templates/expressjs/template.tmpl @@ -37,10 +37,9 @@ RUN npm install -g nodemon COPY . . -ENV PORT={{ .app_port }} ENV NODE_ENV={{ .build_mode }} -EXPOSE {{ .app_port }} +EXPOSE 3000 {{ if eq .process_manager "pm2" }} CMD ["pm2-runtime", "start", "{{ .entry_file }}", "--name", "express-app"] diff --git a/templates/kotlin-spring-boot/config.json b/templates/kotlin-spring-boot/config.json index b60d355..4da36c4 100644 --- a/templates/kotlin-spring-boot/config.json +++ b/templates/kotlin-spring-boot/config.json @@ -40,15 +40,6 @@ ], "type": "select", "category": "optional" - }, - { - "default": "8080", - "label": "애플리케이션 포트", - "name": "app_port", - "options": [], - "type": "number", - "category": "optional", - "description": "Spring Boot 서버가 실행될 포트 번호. 이 값은 환경변수 SERVER_PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/kotlin-spring-boot/template.tmpl b/templates/kotlin-spring-boot/template.tmpl index 3355496..de1844d 100644 --- a/templates/kotlin-spring-boot/template.tmpl +++ b/templates/kotlin-spring-boot/template.tmpl @@ -24,10 +24,9 @@ RUN chown spring:spring app.jar USER spring -ENV SERVER_PORT={{ .app_port }} ENV SPRING_PROFILES_ACTIVE={{ .spring_profile }} - -EXPOSE {{ .app_port }} ENV JAVA_OPTS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0" +EXPOSE 8080 + CMD ["sh", "-c", "java $JAVA_OPTS -jar app.jar"] \ No newline at end of file diff --git a/templates/mongodb/config.json b/templates/mongodb/config.json index 42cf7b9..2778250 100644 --- a/templates/mongodb/config.json +++ b/templates/mongodb/config.json @@ -27,15 +27,6 @@ "type": "select", "category": "required" }, - { - "default": "27017", - "label": "MongoDB 포트", - "name": "mongo_port", - "options": [], - "type": "number", - "category": "optional", - "description": "MongoDB가 실행될 포트 번호입니다. 기본값은 27017입니다." - }, { "label": "데이터베이스명", "name": "database_name", diff --git a/templates/mongodb/template.tmpl b/templates/mongodb/template.tmpl index e024d90..2117408 100644 --- a/templates/mongodb/template.tmpl +++ b/templates/mongodb/template.tmpl @@ -8,8 +8,6 @@ ENV MONGO_INITDB_DATABASE={{ .database_name }} RUN echo 'db.getSiblingDB("{{ .database_name }}").createUser({user: "{{ .app_username }}", pwd: "{{ .app_password }}", roles: [{role: "readWrite", db: "{{ .database_name }}"}]})' > /docker-entrypoint-initdb.d/01-create-user.js {{- end }} -EXPOSE {{ .mongo_port }} +EXPOSE 27017 -VOLUME ["/data/db", "/data/configdb"] - -CMD ["mongod", "--port", "{{ .mongo_port }}"] \ No newline at end of file +VOLUME ["/data/db", "/data/configdb"] \ No newline at end of file diff --git a/templates/nestjs/config.json b/templates/nestjs/config.json index 71b2526..13c34f2 100644 --- a/templates/nestjs/config.json +++ b/templates/nestjs/config.json @@ -35,15 +35,6 @@ ], "type": "select", "category": "required" - }, - { - "default": "3000", - "label": "애플리케이션 포트", - "name": "app_port", - "options": [], - "type": "number", - "category": "optional", - "description": "NestJS 서버가 실행될 포트 번호. 이 값은 환경변수 PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/nestjs/template.tmpl b/templates/nestjs/template.tmpl index 6bf8697..6fc1afa 100644 --- a/templates/nestjs/template.tmpl +++ b/templates/nestjs/template.tmpl @@ -40,8 +40,6 @@ RUN npm install -g pnpm && pnpm install --prod COPY --from=builder /app/dist ./dist -ENV PORT={{ .app_port }} - -EXPOSE {{ .app_port }} +EXPOSE 3000 CMD ["node", "dist/main"] \ No newline at end of file diff --git a/templates/nextjs/config.json b/templates/nextjs/config.json index 9088009..9c291fb 100644 --- a/templates/nextjs/config.json +++ b/templates/nextjs/config.json @@ -35,15 +35,6 @@ ], "type": "select", "category": "required" - }, - { - "default": "3000", - "label": "애플리케이션 포트", - "name": "app_port", - "options": [], - "type": "number", - "category": "optional", - "description": "Next.js 서버가 실행될 포트 번호. 이 값은 환경변수 PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/nextjs/template.tmpl b/templates/nextjs/template.tmpl index 81a7764..c5998cb 100644 --- a/templates/nextjs/template.tmpl +++ b/templates/nextjs/template.tmpl @@ -54,9 +54,7 @@ COPY --from=builder /app/package.json ./package.json USER nextjs -ENV PORT={{ .app_port }} - -EXPOSE {{ .app_port }} +EXPOSE 3000 {{ if eq .package_manager "npm" }} CMD ["npm", "start"] diff --git a/templates/redis/config.json b/templates/redis/config.json index 58fc0f3..4271e03 100644 --- a/templates/redis/config.json +++ b/templates/redis/config.json @@ -23,14 +23,6 @@ "type": "select", "category": "required" }, - { - "default": "6379", - "label": "Redis 포트", - "name": "redis_port", - "options": [], - "type": "number", - "category": "optional" - }, { "label": "Redis 비밀번호", "name": "redis_password", diff --git a/templates/redis/template.tmpl b/templates/redis/template.tmpl index 4d35e13..8ff3707 100644 --- a/templates/redis/template.tmpl +++ b/templates/redis/template.tmpl @@ -1,7 +1,7 @@ FROM redis:{{ .redis_version }}-alpine -EXPOSE {{ .redis_port }} +EXPOSE 6379 VOLUME ["/data"] -CMD ["redis-server", "--port", "{{ .redis_port }}", "--appendonly", "yes", "--requirepass", "{{ .redis_password }}"{{ if .maxmemory }}, "--maxmemory", "{{ .maxmemory }}"{{ end }}{{ if .maxmemory_policy }}, "--maxmemory-policy", "{{ .maxmemory_policy }}"{{ end }}] \ No newline at end of file +CMD ["redis-server", "--appendonly", "yes", "--requirepass", "{{ .redis_password }}"{{ if .maxmemory }}, "--maxmemory", "{{ .maxmemory }}"{{ end }}{{ if .maxmemory_policy }}, "--maxmemory-policy", "{{ .maxmemory_policy }}"{{ end }}] \ No newline at end of file diff --git a/templates/spring-boot/config.json b/templates/spring-boot/config.json index 22da86d..8f0354b 100644 --- a/templates/spring-boot/config.json +++ b/templates/spring-boot/config.json @@ -62,15 +62,6 @@ ], "type": "select", "category": "optional" - }, - { - "default": "8080", - "label": "애플리케이션 포트", - "name": "app_port", - "options": [], - "type": "number", - "category": "optional", - "description": "Spring Boot 서버가 실행될 포트 번호. 이 값은 환경변수 SERVER_PORT로 설정되어 애플리케이션에 전달되며, 네트워크 포트와 자동으로 동기화됩니다." } ], "template_ports": [ diff --git a/templates/spring-boot/template.tmpl b/templates/spring-boot/template.tmpl index 64c93da..2d47889 100644 --- a/templates/spring-boot/template.tmpl +++ b/templates/spring-boot/template.tmpl @@ -33,13 +33,12 @@ RUN chown spring:spring app.jar USER spring -ENV SERVER_PORT={{ .app_port }} ENV SPRING_PROFILES_ACTIVE={{ .spring_profile }} - -EXPOSE {{ .app_port }} ENV JAVA_OPTS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -XX:InitialRAMPercentage=50.0" +EXPOSE 8080 + HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://localhost:{{ .app_port }}/actuator/health || exit 1 + CMD wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1 ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"] \ No newline at end of file From 75402e699dcb442420e18f154b98a7f23ae69744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 08:05:01 +0900 Subject: [PATCH 10/14] feat: add default resources and port guide to all templates - 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 --- templates/django/config.json | 5 +++++ templates/expressjs/config.json | 15 +++++++++------ templates/fastapi/config.json | 5 +++++ templates/flask/config.json | 5 +++++ templates/kotlin-spring-boot/config.json | 15 +++++++++------ templates/mongodb/config.json | 5 +++++ templates/mysql/config.json | 5 +++++ templates/nestjs/config.json | 15 +++++++++------ templates/nextjs/config.json | 15 +++++++++------ templates/postgresql/config.json | 5 +++++ templates/react/config.json | 5 +++++ templates/redis/config.json | 5 +++++ templates/spring-boot/config.json | 15 +++++++++------ templates/static-html/config.json | 5 +++++ templates/vuejs/config.json | 5 +++++ 15 files changed, 95 insertions(+), 30 deletions(-) diff --git a/templates/django/config.json b/templates/django/config.json index b7f1d9b..4a602ce 100644 --- a/templates/django/config.json +++ b/templates/django/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 512, + "min_recommended_memory": 512 + }, "default_env": [ { "key": "DJANGO_SETTINGS_MODULE", diff --git a/templates/expressjs/config.json b/templates/expressjs/config.json index 5ecd2c7..efe478c 100644 --- a/templates/expressjs/config.json +++ b/templates/expressjs/config.json @@ -1,16 +1,19 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 512, + "min_recommended_memory": 512 + }, "default_env": [ { "key": "NODE_ENV", "value": "production" } ], - "default_ports": [ - { - "internal_port": 3000, - "network_type": "http" - } - ], + "port_guide": { + "default_port": 3000, + "description": "Express.js는 일반적으로 3000번 포트를 사용합니다. 코드에서 설정한 포트(app.listen 또는 process.env.PORT)에 맞게 네트워크 포트를 추가하세요." + }, "template_options": [ { "default": "20", diff --git a/templates/fastapi/config.json b/templates/fastapi/config.json index 0f2d8eb..6f62410 100644 --- a/templates/fastapi/config.json +++ b/templates/fastapi/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 512, + "min_recommended_memory": 512 + }, "default_env": [ { "key": "PYTHONUNBUFFERED", diff --git a/templates/flask/config.json b/templates/flask/config.json index 3f75ddb..e987cb3 100644 --- a/templates/flask/config.json +++ b/templates/flask/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 512, + "min_recommended_memory": 512 + }, "default_env": [ { "key": "FLASK_APP", diff --git a/templates/kotlin-spring-boot/config.json b/templates/kotlin-spring-boot/config.json index 4da36c4..d936635 100644 --- a/templates/kotlin-spring-boot/config.json +++ b/templates/kotlin-spring-boot/config.json @@ -1,11 +1,14 @@ { + "default_resources": { + "default_cpu": 1000, + "default_memory": 1024, + "min_recommended_memory": 1024 + }, "default_env": [], - "default_ports": [ - { - "internal_port": 8080, - "network_type": "http" - } - ], + "port_guide": { + "default_port": 8080, + "description": "Spring Boot는 기본적으로 8080번 포트를 사용합니다. 설정에서 server.port를 변경한 경우 해당 포트를 추가하세요." + }, "template_options": [ { "default": "17", diff --git a/templates/mongodb/config.json b/templates/mongodb/config.json index 2778250..d8f6a1b 100644 --- a/templates/mongodb/config.json +++ b/templates/mongodb/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 1000, + "default_memory": 1024, + "min_recommended_memory": 1024 + }, "default_env": [ { "key": "MONGO_INITDB_ROOT_USERNAME", diff --git a/templates/mysql/config.json b/templates/mysql/config.json index 2ec8383..b5658a1 100644 --- a/templates/mysql/config.json +++ b/templates/mysql/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 1000, + "default_memory": 1024, + "min_recommended_memory": 1024 + }, "default_env": [ { "key": "MYSQL_ROOT_PASSWORD", diff --git a/templates/nestjs/config.json b/templates/nestjs/config.json index 13c34f2..f8987a7 100644 --- a/templates/nestjs/config.json +++ b/templates/nestjs/config.json @@ -1,16 +1,19 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 512, + "min_recommended_memory": 512 + }, "default_env": [ { "key": "NODE_ENV", "value": "production" } ], - "default_ports": [ - { - "internal_port": 3000, - "network_type": "http" - } - ], + "port_guide": { + "default_port": 3000, + "description": "NestJS는 일반적으로 3000번 포트를 사용합니다. main.ts에서 설정한 포트(app.listen 또는 process.env.PORT)에 맞게 네트워크 포트를 추가하세요." + }, "template_options": [ { "default": "20", diff --git a/templates/nextjs/config.json b/templates/nextjs/config.json index 9c291fb..30318ac 100644 --- a/templates/nextjs/config.json +++ b/templates/nextjs/config.json @@ -1,16 +1,19 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 512, + "min_recommended_memory": 512 + }, "default_env": [ { "key": "NODE_ENV", "value": "production" } ], - "default_ports": [ - { - "internal_port": 3000, - "network_type": "http" - } - ], + "port_guide": { + "default_port": 3000, + "description": "Next.js는 기본적으로 3000번 포트를 사용합니다. next.config.js나 시작 명령어(-p 플래그)에서 변경한 경우 해당 포트를 추가하세요." + }, "template_options": [ { "default": "20", diff --git a/templates/postgresql/config.json b/templates/postgresql/config.json index ff76e04..fb75e3f 100644 --- a/templates/postgresql/config.json +++ b/templates/postgresql/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 512, + "min_recommended_memory": 512 + }, "default_env": [ { "key": "POSTGRES_PASSWORD", diff --git a/templates/react/config.json b/templates/react/config.json index aad706d..fc3f82a 100644 --- a/templates/react/config.json +++ b/templates/react/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 256, + "min_recommended_memory": 128 + }, "default_env": [ { "key": "NODE_ENV", diff --git a/templates/redis/config.json b/templates/redis/config.json index 4271e03..8c964f5 100644 --- a/templates/redis/config.json +++ b/templates/redis/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 512, + "min_recommended_memory": 512 + }, "default_env": [ { "key": "REDIS_PASSWORD", diff --git a/templates/spring-boot/config.json b/templates/spring-boot/config.json index 8f0354b..9ad52c5 100644 --- a/templates/spring-boot/config.json +++ b/templates/spring-boot/config.json @@ -1,11 +1,14 @@ { + "default_resources": { + "default_cpu": 1000, + "default_memory": 1024, + "min_recommended_memory": 1024 + }, "default_env": [], - "default_ports": [ - { - "internal_port": 8080, - "network_type": "http" - } - ], + "port_guide": { + "default_port": 8080, + "description": "Spring Boot는 기본적으로 8080번 포트를 사용합니다. 설정에서 server.port를 변경한 경우 해당 포트를 추가하세요." + }, "template_options": [ { "default": "17", diff --git a/templates/static-html/config.json b/templates/static-html/config.json index 40d9f45..aa74b0c 100644 --- a/templates/static-html/config.json +++ b/templates/static-html/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 128, + "min_recommended_memory": 128 + }, "default_env": [], "default_ports": [ { diff --git a/templates/vuejs/config.json b/templates/vuejs/config.json index 8425f62..3321aaf 100644 --- a/templates/vuejs/config.json +++ b/templates/vuejs/config.json @@ -1,4 +1,9 @@ { + "default_resources": { + "default_cpu": 500, + "default_memory": 256, + "min_recommended_memory": 128 + }, "default_env": [ { "key": "NODE_ENV", From 1535cb0da6a91310fe58d42df10a35e5249d9eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 08:31:22 +0900 Subject: [PATCH 11/14] fix: update test mappings for removed port options 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 --- test-projects/mappings.json | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/test-projects/mappings.json b/test-projects/mappings.json index 678cd4f..9b6213f 100644 --- a/test-projects/mappings.json +++ b/test-projects/mappings.json @@ -407,13 +407,11 @@ "test_project": "test-projects/database/mongodb", "default_options": { "mongo_version": "7.0", - "mongo_port": "27017", - "root_username": "", - "root_password": "", - "database_name": "", - "user_username": "", - "user_password": "", - "wiredtiger_cache_size": "1GB" + "root_username": "admin", + "root_password": "testpass", + "database_name": "testdb", + "app_username": "", + "app_password": "" } }, "redis": { @@ -421,8 +419,7 @@ "test_project": "test-projects/database/redis", "default_options": { "redis_version": "7.2", - "redis_port": "6379", - "redis_password": "", + "redis_password": "testpass", "maxmemory": "", "maxmemory_policy": "allkeys-lru" } From eaef354a1d97c30a151f8b6c0d7cbe1031af11fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 09:21:23 +0900 Subject: [PATCH 12/14] fix: align template variable keys in test mappings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- test-projects/mappings.json | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/test-projects/mappings.json b/test-projects/mappings.json index 9b6213f..2a95ea8 100644 --- a/test-projects/mappings.json +++ b/test-projects/mappings.json @@ -8,7 +8,8 @@ "options": { "node_version": "20", "package_manager": "npm", - "build_output": "dist" + "build_output": "dist", + "app_port": "80" } }, { @@ -17,7 +18,8 @@ "options": { "node_version": "20", "package_manager": "yarn", - "build_output": "dist" + "build_output": "dist", + "app_port": "80" } }, { @@ -26,7 +28,8 @@ "options": { "node_version": "20", "package_manager": "pnpm", - "build_output": "dist" + "build_output": "dist", + "app_port": "80" } } ] @@ -40,7 +43,8 @@ "options": { "node_version": "20", "package_manager": "npm", - "build_output": "dist" + "build_output": "dist", + "app_port": "80" } }, { @@ -49,7 +53,8 @@ "options": { "node_version": "20", "package_manager": "yarn", - "build_output": "dist" + "build_output": "dist", + "app_port": "80" } }, { @@ -58,7 +63,8 @@ "options": { "node_version": "20", "package_manager": "pnpm", - "build_output": "dist" + "build_output": "dist", + "app_port": "80" } } ] @@ -99,7 +105,8 @@ "template": "templates/static-html", "test_project": "test-projects/frontend/static-html", "default_options": { - "nginx_version": "1.26" + "nginx_version": "1.26", + "app_port": "80" } }, "expressjs": { @@ -111,7 +118,7 @@ "options": { "node_version": "20", "package_manager": "npm", - "node_env": "production", + "build_mode": "production", "process_manager": "pm2", "app_port": "3000", "entry_file": "index.js" @@ -123,7 +130,7 @@ "options": { "node_version": "20", "package_manager": "yarn", - "node_env": "development", + "build_mode": "development", "process_manager": "nodemon", "app_port": "3000", "entry_file": "index.js" @@ -135,7 +142,7 @@ "options": { "node_version": "20", "package_manager": "npm", - "node_env": "production", + "build_mode": "production", "process_manager": "none", "app_port": "3000", "entry_file": "index.js" @@ -147,7 +154,7 @@ "options": { "node_version": "20", "package_manager": "pnpm", - "node_env": "production", + "build_mode": "production", "process_manager": "pm2", "app_port": "3000", "entry_file": "index.js" @@ -159,7 +166,7 @@ "options": { "node_version": "20", "package_manager": "pnpm", - "node_env": "development", + "build_mode": "development", "process_manager": "nodemon", "app_port": "3000", "entry_file": "index.js" @@ -171,7 +178,7 @@ "options": { "node_version": "20", "package_manager": "pnpm", - "node_env": "production", + "build_mode": "production", "process_manager": "none", "app_port": "3000", "entry_file": "index.js" @@ -396,8 +403,8 @@ "shared_buffers": "128MB", "postgres_password": "", "database_name": "myapp", - "user_username": "", - "user_password": "", + "superuser_username": "", + "superuser_password": "", "effective_cache_size": "4GB", "work_mem": "4MB" } From cb2071b7d5dbdb7ca4ed83845db005ae3a701f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 09:39:18 +0900 Subject: [PATCH 13/14] refactor: remove unused template_ports field from all templates - 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 --- templates/django/config.json | 9 +-------- templates/expressjs/config.json | 7 ------- templates/fastapi/config.json | 9 +-------- templates/flask/config.json | 9 +-------- templates/kotlin-spring-boot/config.json | 9 +-------- templates/mongodb/config.json | 7 ------- templates/mysql/config.json | 7 ------- templates/nestjs/config.json | 7 ------- templates/nextjs/config.json | 7 ------- templates/postgresql/config.json | 7 ------- templates/react/config.json | 7 ------- templates/redis/config.json | 7 ------- templates/spring-boot/config.json | 9 +-------- templates/static-html/config.json | 7 ------- templates/vuejs/config.json | 7 ------- 15 files changed, 5 insertions(+), 110 deletions(-) diff --git a/templates/django/config.json b/templates/django/config.json index 4a602ce..bfeebf1 100644 --- a/templates/django/config.json +++ b/templates/django/config.json @@ -90,12 +90,5 @@ "category": "advanced", "description": "동시 요청 처리를 위한 워커 프로세스 수. CPU 코어 수와 동일하게 설정 권장." } - ], - "template_ports": [ - { - "description": "Django server port", - "internal_port": 8000, - "network_type": "http" - } ] -} \ No newline at end of file +} diff --git a/templates/expressjs/config.json b/templates/expressjs/config.json index efe478c..33f0f6f 100644 --- a/templates/expressjs/config.json +++ b/templates/expressjs/config.json @@ -78,12 +78,5 @@ "category": "advanced", "description": "프로덕션: pm2 권장, 개발: nodemon 권장" } - ], - "template_ports": [ - { - "description": "Express.js HTTP port", - "internal_port": 3000, - "network_type": "http" - } ] } diff --git a/templates/fastapi/config.json b/templates/fastapi/config.json index 6f62410..7b33813 100644 --- a/templates/fastapi/config.json +++ b/templates/fastapi/config.json @@ -87,12 +87,5 @@ "category": "advanced", "description": "동시 요청 처리를 위한 워커 프로세스 수. CPU 코어 수와 동일하게 설정 권장." } - ], - "template_ports": [ - { - "description": "FastAPI server port", - "internal_port": 8000, - "network_type": "http" - } ] -} \ No newline at end of file +} diff --git a/templates/flask/config.json b/templates/flask/config.json index e987cb3..9389312 100644 --- a/templates/flask/config.json +++ b/templates/flask/config.json @@ -91,12 +91,5 @@ "category": "advanced", "description": "동시 요청 처리를 위한 워커 프로세스 수. CPU 코어 수와 동일하게 설정 권장." } - ], - "template_ports": [ - { - "description": "Flask server port", - "internal_port": 5000, - "network_type": "http" - } ] -} \ No newline at end of file +} diff --git a/templates/kotlin-spring-boot/config.json b/templates/kotlin-spring-boot/config.json index d936635..468dca4 100644 --- a/templates/kotlin-spring-boot/config.json +++ b/templates/kotlin-spring-boot/config.json @@ -44,12 +44,5 @@ "type": "select", "category": "optional" } - ], - "template_ports": [ - { - "description": "Spring Boot server port", - "internal_port": 8080, - "network_type": "http" - } ] -} \ No newline at end of file +} diff --git a/templates/mongodb/config.json b/templates/mongodb/config.json index d8f6a1b..28a11ad 100644 --- a/templates/mongodb/config.json +++ b/templates/mongodb/config.json @@ -76,13 +76,6 @@ "description": "애플리케이션 계정의 비밀번호. 사용자명과 함께 설정 시 Init 스크립트를 통해 계정이 생성됩니다." } ], - "template_ports": [ - { - "description": "MongoDB port", - "internal_port": 27017, - "network_type": "tcp" - } - ], "template_volumes": [ { "mount_path": "/data/db", diff --git a/templates/mysql/config.json b/templates/mysql/config.json index b5658a1..7683dca 100644 --- a/templates/mysql/config.json +++ b/templates/mysql/config.json @@ -108,13 +108,6 @@ "description": "클라이언트와 서버 간 전송 가능한 최대 패킷 크기. 큰 데이터 처리 시 증가 필요." } ], - "template_ports": [ - { - "description": "MySQL port", - "internal_port": 3306, - "network_type": "tcp" - } - ], "template_volumes": [ { "mount_path": "/var/lib/mysql", diff --git a/templates/nestjs/config.json b/templates/nestjs/config.json index f8987a7..89d08e7 100644 --- a/templates/nestjs/config.json +++ b/templates/nestjs/config.json @@ -39,12 +39,5 @@ "type": "select", "category": "required" } - ], - "template_ports": [ - { - "description": "NestJS HTTP port", - "internal_port": 3000, - "network_type": "http" - } ] } diff --git a/templates/nextjs/config.json b/templates/nextjs/config.json index 30318ac..6374206 100644 --- a/templates/nextjs/config.json +++ b/templates/nextjs/config.json @@ -39,12 +39,5 @@ "type": "select", "category": "required" } - ], - "template_ports": [ - { - "description": "Next.js server port", - "internal_port": 3000, - "network_type": "http" - } ] } diff --git a/templates/postgresql/config.json b/templates/postgresql/config.json index fb75e3f..f5e5ac4 100644 --- a/templates/postgresql/config.json +++ b/templates/postgresql/config.json @@ -101,13 +101,6 @@ "description": "정렬 및 해시 테이블 작업에 사용되는 메모리." } ], - "template_ports": [ - { - "description": "PostgreSQL port", - "internal_port": 5432, - "network_type": "tcp" - } - ], "template_volumes": [ { "mount_path": "/var/lib/postgresql/data", diff --git a/templates/react/config.json b/templates/react/config.json index fc3f82a..958b3ac 100644 --- a/templates/react/config.json +++ b/templates/react/config.json @@ -63,12 +63,5 @@ "category": "optional", "description": "Nginx 서버가 실행될 포트 번호. 네트워크 포트와 자동으로 동기화됩니다." } - ], - "template_ports": [ - { - "description": "HTTP port", - "internal_port": 80, - "network_type": "http" - } ] } diff --git a/templates/redis/config.json b/templates/redis/config.json index 8c964f5..5c1ab14 100644 --- a/templates/redis/config.json +++ b/templates/redis/config.json @@ -61,13 +61,6 @@ "description": "메모리 한계 도달 시 키 제거 정책. LRU: 최근 사용, LFU: 사용 빈도." } ], - "template_ports": [ - { - "description": "Redis port", - "internal_port": 6379, - "network_type": "tcp" - } - ], "template_volumes": [ { "mount_path": "/data", diff --git a/templates/spring-boot/config.json b/templates/spring-boot/config.json index 9ad52c5..5502268 100644 --- a/templates/spring-boot/config.json +++ b/templates/spring-boot/config.json @@ -66,12 +66,5 @@ "type": "select", "category": "optional" } - ], - "template_ports": [ - { - "description": "Spring Boot server port", - "internal_port": 8080, - "network_type": "http" - } ] -} \ No newline at end of file +} diff --git a/templates/static-html/config.json b/templates/static-html/config.json index aa74b0c..ff53d4a 100644 --- a/templates/static-html/config.json +++ b/templates/static-html/config.json @@ -32,12 +32,5 @@ "category": "optional", "description": "Nginx 서버가 실행될 포트 번호. 네트워크 포트와 자동으로 동기화됩니다." } - ], - "template_ports": [ - { - "description": "HTTP port", - "internal_port": 80, - "network_type": "http" - } ] } diff --git a/templates/vuejs/config.json b/templates/vuejs/config.json index 3321aaf..2cd405f 100644 --- a/templates/vuejs/config.json +++ b/templates/vuejs/config.json @@ -63,12 +63,5 @@ "category": "optional", "description": "Nginx 서버가 실행될 포트 번호. 네트워크 포트와 자동으로 동기화됩니다." } - ], - "template_ports": [ - { - "description": "Vue.js HTTP port", - "internal_port": 80, - "network_type": "http" - } ] } From cf77bdd5861a710552f8d4acc423e42787dea1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EC=98=88=EC=A4=80?= Date: Sat, 15 Nov 2025 09:46:18 +0900 Subject: [PATCH 14/14] refactor: optimize default resource allocations for templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- templates/mongodb/config.json | 6 +++--- templates/mysql/config.json | 6 +++--- templates/react/config.json | 6 +++--- templates/redis/config.json | 6 +++--- templates/vuejs/config.json | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/templates/mongodb/config.json b/templates/mongodb/config.json index 28a11ad..c234282 100644 --- a/templates/mongodb/config.json +++ b/templates/mongodb/config.json @@ -1,8 +1,8 @@ { "default_resources": { - "default_cpu": 1000, - "default_memory": 1024, - "min_recommended_memory": 1024 + "default_cpu": 512, + "default_memory": 512, + "min_recommended_memory": 256 }, "default_env": [ { diff --git a/templates/mysql/config.json b/templates/mysql/config.json index 7683dca..84cd65a 100644 --- a/templates/mysql/config.json +++ b/templates/mysql/config.json @@ -1,8 +1,8 @@ { "default_resources": { - "default_cpu": 1000, - "default_memory": 1024, - "min_recommended_memory": 1024 + "default_cpu": 512, + "default_memory": 512, + "min_recommended_memory": 256 }, "default_env": [ { diff --git a/templates/react/config.json b/templates/react/config.json index 958b3ac..ae3aa56 100644 --- a/templates/react/config.json +++ b/templates/react/config.json @@ -1,8 +1,8 @@ { "default_resources": { - "default_cpu": 500, - "default_memory": 256, - "min_recommended_memory": 128 + "default_cpu": 256, + "default_memory": 128, + "min_recommended_memory": 64 }, "default_env": [ { diff --git a/templates/redis/config.json b/templates/redis/config.json index 5c1ab14..9faf1cd 100644 --- a/templates/redis/config.json +++ b/templates/redis/config.json @@ -1,8 +1,8 @@ { "default_resources": { - "default_cpu": 500, - "default_memory": 512, - "min_recommended_memory": 512 + "default_cpu": 256, + "default_memory": 256, + "min_recommended_memory": 128 }, "default_env": [ { diff --git a/templates/vuejs/config.json b/templates/vuejs/config.json index 2cd405f..090f124 100644 --- a/templates/vuejs/config.json +++ b/templates/vuejs/config.json @@ -1,8 +1,8 @@ { "default_resources": { - "default_cpu": 500, - "default_memory": 256, - "min_recommended_memory": 128 + "default_cpu": 256, + "default_memory": 128, + "min_recommended_memory": 64 }, "default_env": [ {