Some checks failed
Build Push and Restart Compose / deploy (push) Failing after 11m20s
- `/templates/pages/asset.html`, `/templates/pages/autotrade.html` HTML 템플릿 삭제. - `/static/js/asset.js`, `/static/js/autotrade.js` 클라이언트 스크립트 제거. - 관련 함수 및 초기화 로직 삭제 (자산 조회 및 자동매매 기능 비활성화).
51 lines
1.4 KiB
Docker
51 lines
1.4 KiB
Docker
# ── 프론트엔드 빌드 스테이지 ─────────────────────────────────
|
|
FROM node:22-alpine AS frontend
|
|
|
|
WORKDIR /app
|
|
|
|
COPY frontend/package.json frontend/package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY frontend/ .
|
|
RUN npm run build
|
|
|
|
# ── Go 빌드 스테이지 ─────────────────────────────────────────
|
|
FROM golang:1.24-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# 의존성 파일 복사 (vendor 디렉토리 사용)
|
|
COPY go.mod go.sum ./
|
|
COPY vendor/ vendor/
|
|
|
|
# 소스 코드 복사
|
|
COPY . .
|
|
|
|
# CGO 비활성화 후 정적 바이너리 빌드
|
|
RUN CGO_ENABLED=0 GOOS=linux GOTOOLCHAIN=auto go build -mod=vendor -o stocksearch .
|
|
|
|
# ── 실행 스테이지 ──────────────────────────────────────────
|
|
FROM alpine:latest
|
|
|
|
# HTTPS 요청을 위한 CA 인증서
|
|
RUN apk --no-cache add ca-certificates tzdata
|
|
|
|
# 한국 시간대 설정
|
|
ENV TZ=Asia/Seoul
|
|
|
|
WORKDIR /app
|
|
|
|
# 바이너리 복사
|
|
COPY --from=builder /app/stocksearch .
|
|
|
|
# 런타임에 필요한 파일 복사
|
|
COPY --from=builder /app/CORPCODE.xml .
|
|
|
|
# 프론트엔드 빌드 결과물 복사
|
|
COPY --from=frontend /app/build frontend/build/
|
|
|
|
EXPOSE 8080
|
|
|
|
# .env 파일은 컨테이너 실행 시 마운트하거나 환경변수로 주입
|
|
ENTRYPOINT ["./stocksearch"]
|