Compare commits

..

No commits in common. "d7bd69f68c8cca3ba3484cf0ab78d8daa0db779e" and "fd15ed5a35a646ebc521c773d1dafad5c24ffa90" have entirely different histories.

View File

@ -51,27 +51,24 @@ jobs:
echo "Using ACTOR: $ACTOR" echo "Using ACTOR: $ACTOR"
echo "Using REPO_NAME: $REPO_NAME" echo "Using REPO_NAME: $REPO_NAME"
# Build with compression and smaller layers # Build with compression
docker build --compress --no-cache -t git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest ./be -f ./be/Dockerfile.prod docker build --compress -t git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest ./be -f ./be/Dockerfile.prod
# Push with retries # Save image to tar file
max_retries=3 docker save git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest > backend.tar
retry_count=0
while [ $retry_count -lt $max_retries ]; do # Split the tar file into smaller chunks (100MB each)
if docker push git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest; then split -b 100M backend.tar backend.tar.part_
break
fi # Push each chunk
retry_count=$((retry_count + 1)) for chunk in backend.tar.part_*; do
if [ $retry_count -lt $max_retries ]; then docker load < "$chunk"
echo "Push failed, retrying in 10 seconds... (Attempt $retry_count of $max_retries)" docker push git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest
sleep 10 sleep 5 # Add delay between pushes
fi
done done
if [ $retry_count -eq $max_retries ]; then # Cleanup
echo "Failed to push after $max_retries attempts" rm backend.tar backend.tar.part_*
exit 1
fi
- name: Build and push frontend image - name: Build and push frontend image
env: env:
@ -96,24 +93,21 @@ jobs:
echo "Using ACTOR: $ACTOR" echo "Using ACTOR: $ACTOR"
echo "Using REPO_NAME: $REPO_NAME" echo "Using REPO_NAME: $REPO_NAME"
# Build with compression and smaller layers # Build with compression
docker build --compress --no-cache -t git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest ./fe -f ./fe/Dockerfile.prod docker build --compress -t git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest ./fe -f ./fe/Dockerfile.prod
# Push with retries # Save image to tar file
max_retries=3 docker save git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest > frontend.tar
retry_count=0
while [ $retry_count -lt $max_retries ]; do # Split the tar file into smaller chunks (100MB each)
if docker push git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest; then split -b 100M frontend.tar frontend.tar.part_
break
fi # Push each chunk
retry_count=$((retry_count + 1)) for chunk in frontend.tar.part_*; do
if [ $retry_count -lt $max_retries ]; then docker load < "$chunk"
echo "Push failed, retrying in 10 seconds... (Attempt $retry_count of $max_retries)" docker push git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest
sleep 10 sleep 5 # Add delay between pushes
fi
done done
if [ $retry_count -eq $max_retries ]; then # Cleanup
echo "Failed to push after $max_retries attempts" rm frontend.tar frontend.tar.part_*
exit 1
fi