Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions templates/django/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"default_resources": {
"default_cpu": 500,
"default_memory": 512,
"min_recommended_memory": 512
},
"default_env": [
{
"key": "DJANGO_SETTINGS_MODULE",
Expand Down Expand Up @@ -47,15 +52,22 @@
"name": "app_port",
"options": [],
"type": "number",
"category": "optional"
"category": "optional",
"description": "Django 서버가 실행될 포트 번호. WSGI 서버 실행 시 이 포트로 바인딩되며, 네트워크 포트와 자동으로 동기화됩니다."
},
{
"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",
Expand All @@ -78,12 +90,5 @@
"category": "advanced",
"description": "동시 요청 처리를 위한 워커 프로세스 수. CPU 코어 수와 동일하게 설정 권장."
}
],
"template_ports": [
{
"description": "Django server port",
"internal_port": 8000,
"network_type": "http"
}
]
}
}
55 changes: 23 additions & 32 deletions templates/expressjs/config.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"default_resources": {
"default_cpu": 500,
"default_memory": 512,
"min_recommended_memory": 512
},
"default_env": [
{
"key": "NODE_ENV",
"value": "production"
},
{
"key": "PORT",
"value": "3000"
}
],
"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",
Expand Down Expand Up @@ -42,30 +41,29 @@
},
{
"default": "production",
"label": "Node 환경",
"name": "node_env",
"label": "빌드 모드",
"name": "build_mode",
"options": [
"development",
"production"
],
"type": "select",
"category": "optional"
},
{
"default": "3000",
"label": "애플리케이션 포트",
"name": "app_port",
"options": [],
"type": "number",
"category": "optional"
"category": "optional",
"description": "의존성 설치 모드. production: 프로덕션 의존성만 설치, development: 모든 의존성 설치 (devDependencies 포함)"
},
{
"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",
Expand All @@ -80,12 +78,5 @@
"category": "advanced",
"description": "프로덕션: pm2 권장, 개발: nodemon 권장"
}
],
"template_ports": [
{
"description": "Express.js HTTP port",
"internal_port": 3000,
"network_type": "http"
}
]
}
6 changes: 4 additions & 2 deletions templates/expressjs/template.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand All @@ -37,7 +37,9 @@ RUN npm install -g nodemon

COPY . .

EXPOSE {{ .app_port }}
ENV NODE_ENV={{ .build_mode }}

EXPOSE 3000

{{ if eq .process_manager "pm2" }}
CMD ["pm2-runtime", "start", "{{ .entry_file }}", "--name", "express-app"]
Expand Down
36 changes: 19 additions & 17 deletions templates/fastapi/config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"default_resources": {
"default_cpu": 500,
"default_memory": 512,
"min_recommended_memory": 512
},
"default_env": [
{
"key": "PYTHONUNBUFFERED",
"value": "1"
},
{
"key": "PORT",
"value": "8000"
}
],
"default_ports": [
Expand Down Expand Up @@ -47,15 +48,23 @@
"name": "app_port",
"options": [],
"type": "number",
"category": "optional"
"category": "optional",
"description": "FastAPI 서버가 실행될 포트 번호. ASGI 서버 실행 시 이 포트로 바인딩되며, 네트워크 포트와 자동으로 동기화됩니다."
},
{
"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",
Expand All @@ -78,12 +87,5 @@
"category": "advanced",
"description": "동시 요청 처리를 위한 워커 프로세스 수. CPU 코어 수와 동일하게 설정 권장."
}
],
"template_ports": [
{
"description": "FastAPI server port",
"internal_port": 8000,
"network_type": "http"
}
]
}
}
32 changes: 19 additions & 13 deletions templates/flask/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"default_resources": {
"default_cpu": 500,
"default_memory": 512,
"min_recommended_memory": 512
},
"default_env": [
{
"key": "FLASK_APP",
Expand Down Expand Up @@ -47,15 +52,23 @@
"name": "app_port",
"options": [],
"type": "number",
"category": "optional"
"category": "optional",
"description": "Flask 서버가 실행될 포트 번호. WSGI 서버 실행 시 이 포트로 바인딩되며, 네트워크 포트와 자동으로 동기화됩니다."
},
{
"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",
Expand All @@ -78,12 +91,5 @@
"category": "advanced",
"description": "동시 요청 처리를 위한 워커 프로세스 수. CPU 코어 수와 동일하게 설정 권장."
}
],
"template_ports": [
{
"description": "Flask server port",
"internal_port": 5000,
"network_type": "http"
}
]
}
}
35 changes: 12 additions & 23 deletions templates/kotlin-spring-boot/config.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -26,7 +29,8 @@
"8.5"
],
"type": "select",
"category": "required"
"category": "advanced",
"description": "Gradle 빌드 도구 버전. 특별한 이유가 없다면 기본값 사용을 권장합니다."
},
{
"default": "prod",
Expand All @@ -39,21 +43,6 @@
],
"type": "select",
"category": "optional"
},
{
"default": "8080",
"label": "애플리케이션 포트",
"name": "app_port",
"options": [],
"type": "number",
"category": "optional"
}
],
"template_ports": [
{
"description": "Spring Boot server port",
"internal_port": 8080,
"network_type": "http"
}
]
}
}
4 changes: 2 additions & 2 deletions templates/kotlin-spring-boot/template.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN chown spring:spring app.jar

USER spring

EXPOSE {{ .app_port }}

ENV SPRING_PROFILES_ACTIVE={{ .spring_profile }}
ENV JAVA_OPTS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0"

EXPOSE 8080

CMD ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]
Loading