Compare commits
No commits in common. "3d262773817bacbe4122e1cd5ec8615fc54ae9b1" and "ca438c9016599598b78621d72880a7d572f59e2b" have entirely different histories.
3d26277381
...
ca438c9016
@ -34,6 +34,41 @@ 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: |
|
||||||
|
|||||||
@ -1,22 +1,19 @@
|
|||||||
# 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 --break-system-packages yt-dlp && \
|
pip3 install 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"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user