Try further space optimizations
Some checks failed
Podman Rootless Demo / test-backend (push) Has been skipped
Podman Rootless Demo / test-frontend (push) Successful in 11s
Podman Rootless Demo / build-backend (push) Has been skipped
Podman Rootless Demo / build-frontend (push) Failing after 40s
Podman Rootless Demo / deploy-prod (push) Has been skipped

This commit is contained in:
continuist 2025-09-21 13:48:21 -04:00
parent f6e16fb8ed
commit ba486f4f8c
2 changed files with 29 additions and 3 deletions

View file

@ -197,9 +197,31 @@ jobs:
--password-stdin \
"${{ secrets.REGISTRY_HOST }}"
- name: Disk preflight diagnostic
run: |
echo "=== Podman storage info ==="
podman --remote system df
echo "=== Podman graph root ==="
podman --remote info --format '{{.Store.GraphRoot}}'
echo "=== Disk space info ==="
df -h /home/ci-service /tmp /var/tmp 2>/dev/null || df -h /tmp /var/tmp
echo "=== Inode info ==="
df -i /home/ci-service /tmp /var/tmp 2>/dev/null || df -i /tmp /var/tmp
- name: Safe storage pruning
run: podman --remote system prune -f
- name: Build frontend container image
run: |
podman --remote build --no-cache \
# Create temp directory on larger filesystem
TMP_DIR="/home/ci-service/tmp"
if [ ! -d "$TMP_DIR" ]; then
TMP_DIR="$(mktemp -d)"
fi
export TMPDIR="$TMP_DIR"
podman --remote build \
--tmpdir "$TMP_DIR" \
--build-arg NEXT_PUBLIC_API_HOST=${{ secrets.PROD_BACKEND_HOST }} \
--build-arg NEXT_PUBLIC_API_PORT=${{ secrets.PROD_BACKEND_PORT }} \
-f frontend/Dockerfile \
@ -207,6 +229,10 @@ jobs:
-t "$FRONTEND_IMAGE:latest" \
frontend
- name: Cleanup storage
if: always()
run: podman --remote system prune -f
- name: Push frontend container image
run: |
podman --remote push "$FRONTEND_IMAGE:${{ github.sha }}"

View file

@ -2,9 +2,9 @@
FROM docker.io/node:20-slim AS builder
WORKDIR /app
# Install dependencies with minimal footprint
# Install dependencies with minimal footprint using package-lock.json for deterministic builds
COPY package*.json ./
RUN npm cache clean --force && npm install --no-audit --no-fund --prefer-offline
RUN npm ci --no-audit --no-fund --prefer-offline
# Copy app source
COPY . .