apiVersion: apps/v1 kind: Deployment metadata: name: storefront namespace: manoonoils labels: app: storefront spec: replicas: 1 selector: matchLabels: app: storefront template: metadata: labels: app: storefront spec: containers: - name: storefront image: node:22-alpine workingDir: /app command: - sh - -c - | if [ ! -d ".git" ]; then echo "Cloning repository..." apk add --no-cache git openssh-client mkdir -p ~/.ssh ssh-keyscan -p 222 100.74.155.73 >> ~/.ssh/known_hosts 2>/dev/null || true GIT_SSH_COMMAND='ssh -p 222 -o StrictHostKeyChecking=accept-new' git clone ssh://git@100.74.155.73:222/unchained/manoon-headless.git /app else echo "Pulling latest changes..." git pull fi echo "Installing dependencies..." npm ci --legacy-peer-deps echo "Building..." npm run build echo "Starting..." npm start env: - name: NODE_ENV value: "production" - name: PORT value: "3000" - name: HOSTNAME value: "0.0.0.0" - name: NEXT_PUBLIC_WOOCOMMERCE_URL value: "https://manoonoils.com" - name: NEXT_PUBLIC_WOOCOMMERCE_CONSUMER_KEY value: "ck_6a62a2ac8fa8d50e4757bf3b35c9d052dbbcf09f" - name: NEXT_PUBLIC_WOOCOMMERCE_CONSUMER_SECRET value: "cs_0ea41d2c8fc232d1e609e559ea8561d02c4406ee" ports: - containerPort: 3000 startupProbe: httpGet: path: / port: 3000 periodSeconds: 10 failureThreshold: 60 resources: requests: memory: "512Mi" cpu: "500m" limits: memory: "2Gi" cpu: "1000m"