- Add Dockerfile for building Next.js images - Replace init-container deployment with standard deployment - Add kustomization with image tag tracking - Add deploy.sh script for CI/CD pipeline This enables proper GitOps auto-deployment: 1. Build image with commit hash tag 2. Push to GHCR 3. Update kustomization.yaml image tag 4. Flux detects change and restarts pods
71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
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
|