Compare commits
2 Commits
afd98d7fd6
...
19d25e5528
| Author | SHA1 | Date | |
|---|---|---|---|
| 19d25e5528 | |||
| 64e377d6bc |
@@ -160,7 +160,26 @@
|
|||||||
"Bash(/usr/bin/grep -nE \"^ [a-z0-9_-]+:\" docker-compose.yml)",
|
"Bash(/usr/bin/grep -nE \"^ [a-z0-9_-]+:\" docker-compose.yml)",
|
||||||
"Bash(/usr/bin/grep -nE \"^#{1,3} \" deploy/NAS-SETUP-GUIDE.md)",
|
"Bash(/usr/bin/grep -nE \"^#{1,3} \" deploy/NAS-SETUP-GUIDE.md)",
|
||||||
"Bash(/usr/bin/head -30)",
|
"Bash(/usr/bin/head -30)",
|
||||||
"Bash(/usr/bin/grep -nE \"stage\\\\\\(|DEPLOY_DIR|sh '|sh \\\\\"\" Jenkinsfile)"
|
"Bash(/usr/bin/grep -nE \"stage\\\\\\(|DEPLOY_DIR|sh '|sh \\\\\"\" Jenkinsfile)",
|
||||||
|
"Bash(/usr/bin/awk '/^ [a-z0-9_-]+:/{svc=$1} /ports:/{p=1;next} p&&/^ *- /{print \" \"svc\" \"$2} p&&!/^ *- /{p=0}' docker-compose.yml)",
|
||||||
|
"Bash(/usr/bin/grep -nE \"^ [a-z0-9_-]+:|ports:|^ - \\\\\"\" docker-compose.yml)",
|
||||||
|
"Bash(/usr/bin/head -40)",
|
||||||
|
"Bash(/usr/bin/grep -rn \"proxy_pass\\\\|location /api\\\\|location /\" frontend/nginx.conf frontend/default.conf docker/nginx*.conf)",
|
||||||
|
"Bash(/usr/bin/grep -nE \"server_name|location|proxy_pass|listen\" deploy/nginx-reverse-proxy.conf)",
|
||||||
|
"Bash(/usr/bin/grep -nE \"listen|server_name|location|proxy_pass|try_files|root\" frontend/nginx.conf)",
|
||||||
|
"Bash(/usr/bin/grep -A2 \"^ frontend:\" docker-compose.yml)",
|
||||||
|
"Bash(/usr/bin/head -1)",
|
||||||
|
"Bash(/usr/bin/grep -nE \"3001\" docker-compose.yml)",
|
||||||
|
"Bash(/usr/bin/grep -nE \"3001|3000|:80\\\\\"\")",
|
||||||
|
"Bash(/usr/bin/grep -E \"^[+-].*\\(ports|[0-9]{4}:\\)\")",
|
||||||
|
"Bash(/usr/bin/curl -sk -o /tmp/stock.html -w \" HTTP %{http_code} / %{size_download} bytes / %{time_total}s\\\\n\" --max-time 10 https://stock.shium.net/)",
|
||||||
|
"Bash(/usr/bin/head -c 300 /tmp/stock.html)",
|
||||||
|
"Bash(/usr/bin/curl -sk -o /dev/null -w \" /api/v1/market-data/prices → HTTP %{http_code}\\\\n\" --max-time 10 \"https://stock.shium.net/api/v1/market-data/prices?codes=005930\")",
|
||||||
|
"Bash(/usr/bin/tail -5)",
|
||||||
|
"Bash(/usr/bin/head -2)",
|
||||||
|
"Bash(/usr/bin/cat backend/Dockerfile)",
|
||||||
|
"Bash(/usr/bin/cat backend/requirements.txt)",
|
||||||
|
"Bash(docker --version)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"enableAllProjectMcpServers": true,
|
"enableAllProjectMcpServers": true,
|
||||||
|
|||||||
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@@ -4,6 +4,9 @@ pipeline {
|
|||||||
environment {
|
environment {
|
||||||
DEPLOY_DIR = '/volume1/docker/autostock'
|
DEPLOY_DIR = '/volume1/docker/autostock'
|
||||||
ENV_FILE = "${DEPLOY_DIR}/.env"
|
ENV_FILE = "${DEPLOY_DIR}/.env"
|
||||||
|
// Dockerfile 의 pip/npm 캐시 마운트(RUN --mount=type=cache)를 쓰려면 BuildKit 필요
|
||||||
|
DOCKER_BUILDKIT = '1'
|
||||||
|
COMPOSE_DOCKER_CLI_BUILD = '1'
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -13,7 +14,17 @@ RUN apt-get update && apt-get install -y \
|
|||||||
|
|
||||||
# Python 의존성 설치 (requirements.txt 변경 시에만 재설치 — Docker 캐시 활용)
|
# Python 의존성 설치 (requirements.txt 변경 시에만 재설치 — Docker 캐시 활용)
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
# PyTorch는 CPU 전용 휠로 먼저 설치.
|
||||||
|
# PyPI 기본 torch 휠은 NVIDIA CUDA 패키지(nvidia-cublas, nvidia-cudnn 등)를
|
||||||
|
# 수 GB 함께 내려받지만 NAS에 GPU가 없어 전부 불필요하다.
|
||||||
|
# 여기서 먼저 깔아두면 아래 requirements.txt 의 torch 줄은 이미 충족되어 건너뛴다.
|
||||||
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
|
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
||||||
|
|
||||||
|
# 나머지 의존성 — pip 캐시를 빌드 간 재사용 (BuildKit 필요)
|
||||||
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# 애플리케이션 코드 복사 (코드 변경 시에만 이 레이어 갱신)
|
# 애플리케이션 코드 복사 (코드 변경 시에만 이 레이어 갱신)
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
# Build stage
|
# Build stage
|
||||||
FROM node:20-alpine as build
|
FROM node:20-alpine AS build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# 의존성 설치
|
# 의존성 설치 — npm 캐시를 빌드 간 재사용 (BuildKit 필요)
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN --mount=type=cache,target=/root/.npm \
|
||||||
|
npm install
|
||||||
|
|
||||||
# 애플리케이션 빌드
|
# 애플리케이션 빌드
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -9,9 +10,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certifi
|
|||||||
&& npm install -g @anthropic-ai/claude-code \
|
&& npm install -g @anthropic-ai/claude-code \
|
||||||
&& apt-get purge -y curl && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
|
&& apt-get purge -y curl && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Python 의존성 설치
|
# Python 의존성 설치 — pip 캐시를 빌드 간 재사용 (BuildKit 필요)
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# 애플리케이션 코드 복사
|
# 애플리케이션 코드 복사
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Reference in New Issue
Block a user