This commit is contained in:
AI Assistant
2026-03-12 14:06:24 +09:00
parent 8beb4bac17
commit b9940fa4d2
8 changed files with 0 additions and 898 deletions

View File

@@ -1,33 +0,0 @@
# 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"]