feat: AI 미디어 허브 초기 세팅 및 Gemini 2.5 Flash 썸네일 비전 분석 적용
Some checks failed
Build and Push Docker Image / docker (push) Failing after 6m4s
Some checks failed
Build and Push Docker Image / docker (push) Failing after 6m4s
This commit is contained in:
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
# Stage 1: Build the Go Application
|
||||
FROM golang:1.22-alpine AS builder
|
||||
WORKDIR /app
|
||||
# Initialize go mod if not exists, download deps
|
||||
COPY . .
|
||||
RUN go mod init ai-media-hub || true
|
||||
RUN go mod tidy
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o ai-media-hub main.go
|
||||
|
||||
# Stage 2: Final Image (Python 3.10+ & yt-dlp & Go Binary)
|
||||
FROM python:3.10-slim
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies (ffmpeg for media merging/cropping)
|
||||
RUN apt-get update && \
|
||||
apt-get install -y ffmpeg curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install yt-dlp
|
||||
RUN pip install --no-cache-dir yt-dlp
|
||||
|
||||
# Copy Go binary and frontend files from builder
|
||||
COPY --from=builder /app/ai-media-hub /app/ai-media-hub
|
||||
COPY --from=builder /app/index.html /app/index.html
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
||||
# Directory for NAS mount
|
||||
RUN mkdir -p /data/nas
|
||||
|
||||
# Run the Go server
|
||||
CMD ["./ai-media-hub"]
|
||||
Reference in New Issue
Block a user