초기화

This commit is contained in:
AI Assistant
2026-03-12 14:53:20 +09:00
parent 2dab67dcc6
commit b162536254
18 changed files with 0 additions and 1556 deletions

View File

@@ -1,50 +0,0 @@
# 1. Build Go Backend
FROM golang:1.22-bookworm AS builder
# Debian 기반 이미지는 빌드 도구가 이미 포함되어 있으므로 추가 설치 없이 진행합니다.
WORKDIR /build
# Cache go modules
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY backend/ ./
# CGO_ENABLED=1 is required for sqlite3
RUN CGO_ENABLED=1 go build -ldflags="-s -w" -o main main.go
# 2. Final Minimal Image (Python + Go binary + Frontend)
FROM python:3.10-slim
# 파이썬 출력 버퍼링을 비활성화하여 도커 로그에 즉각 표시되도록 설정합니다.
ENV PYTHONUNBUFFERED=1
# Install system dependencies (ffmpeg is required for yt-dlp)
RUN apt-get update && apt-get install -y \
ffmpeg \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies for worker
COPY worker/requirements.txt ./worker/
RUN pip install --no-cache-dir -r worker/requirements.txt
# Copy Go binary from builder
COPY --from=builder /build/main ./main
# Copy worker script
COPY worker/ ./worker/
# Copy frontend
COPY frontend/ ./frontend/
# Ensure directories exist
RUN mkdir -p db downloads
# Expose Go server port
EXPOSE 3000
# Run the Go server command (which will also call the yt-dlp python script when needed)
CMD ["./main"]