release/V1.0.0 #9
@ -34,41 +34,6 @@ jobs:
|
||||
docker build -t ytextractor:${{ github.sha }} -f YTExtractor/Dockerfile .
|
||||
docker tag ytextractor:${{ github.sha }} registry.redecarneir.us/ytextractor:latest
|
||||
docker tag ytextractor:${{ github.sha }} registry.redecarneir.us/ytextractor:${{ github.sha }}
|
||||
|
||||
- name: Build Docker image 2
|
||||
run: |
|
||||
echo "Current directory: $(pwd)"
|
||||
echo "Files in current directory:"
|
||||
ls -la
|
||||
|
||||
COMMIT_SHA=$(git rev-parse --short HEAD)
|
||||
|
||||
# O Dockerfile está em YTExtractor/YTExtractor/ baseado na estrutura mostrada
|
||||
if [ -f "YTExtractor/YTExtractor/Dockerfile" ]; then
|
||||
echo "✅ Found Dockerfile in YTExtractor/YTExtractor/ directory"
|
||||
cd YTExtractor/YTExtractor
|
||||
echo "Building Docker image from project directory..."
|
||||
echo "Files in this directory:"
|
||||
ls -la
|
||||
docker build -t ytextractor:$COMMIT_SHA .
|
||||
elif [ -f "YTExtractor/Dockerfile" ]; then
|
||||
echo "✅ Found Dockerfile in YTExtractor/ directory"
|
||||
cd YTExtractor
|
||||
docker build -t ytextractor:$COMMIT_SHA .
|
||||
else
|
||||
echo "❌ Dockerfile not found!"
|
||||
echo "Searching for Dockerfile..."
|
||||
find . -name "Dockerfile" -type f
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Tag das imagens (voltar para raiz se necessário)
|
||||
cd /workspace/ricardo/YTExtractor
|
||||
docker tag ytextractor:$COMMIT_SHA registry.redecarneir.us/ytextractor:latest
|
||||
docker tag ytextractor:$COMMIT_SHA registry.redecarneir.us/ytextractor:$COMMIT_SHA
|
||||
|
||||
echo "✅ Docker images built successfully"
|
||||
docker images | grep ytextractor
|
||||
|
||||
- name: Push to registry
|
||||
run: |
|
||||
|
||||
@ -1,19 +1,22 @@
|
||||
# Build stage
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore
|
||||
RUN dotnet publish -c Release -o /app
|
||||
|
||||
# Runtime stage
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
WORKDIR /app
|
||||
COPY --from=build /app .
|
||||
|
||||
# Install yt-dlp with --break-system-packages flag (necessário no Debian 12)
|
||||
RUN apt-get update && \
|
||||
apt-get install -y python3-pip && \
|
||||
pip3 install yt-dlp && \
|
||||
pip3 install --break-system-packages yt-dlp && \
|
||||
mkdir /app/temp && \
|
||||
chmod 777 /app/temp && \
|
||||
which yt-dlp || (echo "yt-dlp not found" && exit 1)
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["dotnet", "YTExtractor.dll"]
|
||||
ENTRYPOINT ["dotnet", "YTExtractor.dll"]
|
||||
Loading…
Reference in New Issue
Block a user