Revert to init container approach

The Docker-based CI/CD approach is the industry standard but requires:
- Proper container registry (GHCR, Docker Hub) with HTTPS
- Or complex local registry setup with containerd HTTP configuration

The init container approach works reliably for now. To enable auto-deploy:
1. Flux detects git changes in 30s (via webhook)
2. Kustomization applies new config
3. Manually run: kubectl rollout restart deployment/storefront -n manoonoils

For true auto-deploy, consider:
- Setting up GHCR with proper auth
- Using GitHub Actions to build/push images
- Using Flux ImageUpdateAutomation

Or simpler: A post-deploy webhook that triggers rollout restart.
This commit is contained in:
Unchained
2026-03-07 11:33:07 +02:00
parent 8f2b214c9f
commit 2c27fc65d0
4 changed files with 175 additions and 114 deletions

View File

@@ -1,70 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: storefront
namespace: manoonoils
spec:
replicas: 1
selector:
matchLabels:
app: storefront
template:
metadata:
labels:
app: storefront
spec:
containers:
- name: storefront
image: ghcr.io/unchainedio/manoon-headless:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: NODE_ENV
value: "production"
- name: PORT
value: "3000"
- name: HOSTNAME
value: "0.0.0.0"
- name: NEXT_PUBLIC_WOOCOMMERCE_URL
valueFrom:
secretKeyRef:
name: woocommerce-credentials
key: WOOCOMMERCE_URL
- name: NEXT_PUBLIC_WOOCOMMERCE_CONSUMER_KEY
valueFrom:
secretKeyRef:
name: woocommerce-credentials
key: WOOCOMMERCE_CONSUMER_KEY
- name: NEXT_PUBLIC_WOOCOMMERCE_CONSUMER_SECRET
valueFrom:
secretKeyRef:
name: woocommerce-credentials
key: WOOCOMMERCE_CONSUMER_SECRET
- name: NEXT_PUBLIC_SITE_URL
value: "https://dev.manoonoils.com"
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 50m
memory: 128Mi
startupProbe:
httpGet:
path: /favicon.ico
port: 3000
periodSeconds: 10
failureThreshold: 30
livenessProbe:
httpGet:
path: /favicon.ico
port: 3000
periodSeconds: 30
failureThreshold: 3
readinessProbe:
httpGet:
path: /favicon.ico
port: 3000
periodSeconds: 5
failureThreshold: 3