release/V1.0.0 #9

Merged
ricardo merged 2 commits from release/V1.0.0 into main 2025-05-27 12:55:09 +00:00
2 changed files with 5 additions and 37 deletions

View File

@ -34,41 +34,6 @@ jobs:
docker build -t ytextractor:${{ github.sha }} -f YTExtractor/Dockerfile . 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:latest
docker tag ytextractor:${{ github.sha }} registry.redecarneir.us/ytextractor:${{ github.sha }} 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 - name: Push to registry
run: | run: |

View File

@ -1,19 +1,22 @@
# Build stage
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src WORKDIR /src
COPY . . COPY . .
RUN dotnet restore RUN dotnet restore
RUN dotnet publish -c Release -o /app RUN dotnet publish -c Release -o /app
# Runtime stage
FROM mcr.microsoft.com/dotnet/aspnet:8.0 FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app WORKDIR /app
COPY --from=build /app . COPY --from=build /app .
# Install yt-dlp with --break-system-packages flag (necessário no Debian 12)
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y python3-pip && \ apt-get install -y python3-pip && \
pip3 install yt-dlp && \ pip3 install --break-system-packages yt-dlp && \
mkdir /app/temp && \ mkdir /app/temp && \
chmod 777 /app/temp && \ chmod 777 /app/temp && \
which yt-dlp || (echo "yt-dlp not found" && exit 1) which yt-dlp || (echo "yt-dlp not found" && exit 1)
EXPOSE 80 EXPOSE 80
ENTRYPOINT ["dotnet", "YTExtractor.dll"] ENTRYPOINT ["dotnet", "YTExtractor.dll"]