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
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:
parent
f6e16fb8ed
commit
ba486f4f8c
2 changed files with 29 additions and 3 deletions
|
|
@ -197,9 +197,31 @@ jobs:
|
||||||
--password-stdin \
|
--password-stdin \
|
||||||
"${{ secrets.REGISTRY_HOST }}"
|
"${{ 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
|
- name: Build frontend container image
|
||||||
run: |
|
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_HOST=${{ secrets.PROD_BACKEND_HOST }} \
|
||||||
--build-arg NEXT_PUBLIC_API_PORT=${{ secrets.PROD_BACKEND_PORT }} \
|
--build-arg NEXT_PUBLIC_API_PORT=${{ secrets.PROD_BACKEND_PORT }} \
|
||||||
-f frontend/Dockerfile \
|
-f frontend/Dockerfile \
|
||||||
|
|
@ -207,6 +229,10 @@ jobs:
|
||||||
-t "$FRONTEND_IMAGE:latest" \
|
-t "$FRONTEND_IMAGE:latest" \
|
||||||
frontend
|
frontend
|
||||||
|
|
||||||
|
- name: Cleanup storage
|
||||||
|
if: always()
|
||||||
|
run: podman --remote system prune -f
|
||||||
|
|
||||||
- name: Push frontend container image
|
- name: Push frontend container image
|
||||||
run: |
|
run: |
|
||||||
podman --remote push "$FRONTEND_IMAGE:${{ github.sha }}"
|
podman --remote push "$FRONTEND_IMAGE:${{ github.sha }}"
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
FROM docker.io/node:20-slim AS builder
|
FROM docker.io/node:20-slim AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies with minimal footprint
|
# Install dependencies with minimal footprint using package-lock.json for deterministic builds
|
||||||
COPY package*.json ./
|
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 app source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue