Fix Node.js deployment: add debug output, increase resources for npm install

This commit is contained in:
Unchained
2026-03-06 20:32:14 +02:00
parent d8fe9337bb
commit ba0e789b80

View File

@@ -6,7 +6,6 @@ metadata:
type: Opaque type: Opaque
stringData: stringData:
WOOCOMMERCE_URL: "https://manoonoils.com" WOOCOMMERCE_URL: "https://manoonoils.com"
# You'll need to update these with actual credentials
WOOCOMMERCE_CONSUMER_KEY: "PLACEHOLDER_KEY" WOOCOMMERCE_CONSUMER_KEY: "PLACEHOLDER_KEY"
WOOCOMMERCE_CONSUMER_SECRET: "PLACEHOLDER_SECRET" WOOCOMMERCE_CONSUMER_SECRET: "PLACEHOLDER_SECRET"
--- ---
@@ -34,19 +33,19 @@ spec:
- | - |
set -e set -e
apk add --no-cache git apk add --no-cache git
# Clone from Gitea (HTTP on port 3000)
git clone --depth 1 --branch master \ git clone --depth 1 --branch master \
http://gitea.gitea.svc.cluster.local:3000/unchained/manoon-headless.git \ http://gitea.gitea.svc.cluster.local:3000/unchained/manoon-headless.git \
/workspace /workspace
echo "Clone complete."
echo "Clone complete. Files:"
ls -la /workspace
volumeMounts: volumeMounts:
- name: workspace - name: workspace
mountPath: /workspace mountPath: /workspace
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
resources:
limits:
cpu: 500m
memory: 256Mi
- name: install - name: install
image: node:20-slim image: node:20-slim
workingDir: /workspace workingDir: /workspace
@@ -56,7 +55,7 @@ spec:
- | - |
set -e set -e
echo "Installing dependencies..." echo "Installing dependencies..."
npm ci --prefer-offline --no-audit --silent npm ci --prefer-offline --no-audit 2>&1
echo "Dependencies installed." echo "Dependencies installed."
volumeMounts: volumeMounts:
- name: workspace - name: workspace
@@ -66,7 +65,10 @@ spec:
resources: resources:
limits: limits:
cpu: 2000m cpu: 2000m
memory: 2Gi memory: 3Gi
requests:
cpu: 100m
memory: 1Gi
- name: build - name: build
image: node:20-slim image: node:20-slim
workingDir: /workspace workingDir: /workspace
@@ -105,10 +107,10 @@ spec:
runAsUser: 0 runAsUser: 0
resources: resources:
limits: limits:
cpu: 1000m cpu: 2000m
memory: 1500Mi memory: 2Gi
requests: requests:
cpu: 250m cpu: 100m
memory: 512Mi memory: 512Mi
containers: containers:
- name: storefront - name: storefront
@@ -145,11 +147,11 @@ spec:
value: "https://dev.manoonoils.com" value: "https://dev.manoonoils.com"
resources: resources:
limits: limits:
cpu: 1000m cpu: 500m
memory: 1Gi memory: 512Mi
requests: requests:
cpu: 250m cpu: 50m
memory: 256Mi memory: 128Mi
volumeMounts: volumeMounts:
- name: workspace - name: workspace
mountPath: /workspace mountPath: /workspace