diff --git a/Dockerfile b/Dockerfile index 9ddb0ad..989330b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /app FROM base AS deps COPY package.json package-lock.json* ./ -RUN npm ci +RUN npm install FROM base AS builder COPY --from=deps /app/node_modules ./node_modules diff --git a/k8s/deployment-gitops.yaml b/k8s/deployment-gitops.yaml new file mode 100644 index 0000000..38bc94e --- /dev/null +++ b/k8s/deployment-gitops.yaml @@ -0,0 +1,72 @@ +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" diff --git a/k8s/deployment-simple.yaml b/k8s/deployment-simple.yaml new file mode 100644 index 0000000..d0627ef --- /dev/null +++ b/k8s/deployment-simple.yaml @@ -0,0 +1,100 @@ +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: + initContainers: + - name: build + image: node:22-alpine + workingDir: /app + command: + - sh + - -c + - | + echo "Installing dependencies..." + npm ci --legacy-peer-deps + echo "Building Next.js app..." + npm run build + echo "Build complete!" + env: + - 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" + - name: NODE_ENV + value: "production" + volumeMounts: + - name: app-code + mountPath: /app + resources: + requests: + memory: "1Gi" + cpu: "500m" + limits: + memory: "2Gi" + cpu: "1000m" + containers: + - name: storefront + image: node:22-alpine + workingDir: /app + command: + - sh + - -c + - | + echo "Starting Next.js..." + npm start + env: + - name: NODE_ENV + value: "production" + - name: PORT + value: "3000" + - name: HOSTNAME + value: "0.0.0.0" + ports: + - containerPort: 3000 + protocol: TCP + startupProbe: + httpGet: + path: / + port: 3000 + periodSeconds: 10 + failureThreshold: 30 + readinessProbe: + httpGet: + path: / + port: 3000 + periodSeconds: 5 + failureThreshold: 3 + livenessProbe: + httpGet: + path: / + port: 3000 + periodSeconds: 10 + failureThreshold: 3 + resources: + requests: + memory: "256Mi" + cpu: "100m" + limits: + memory: "512Mi" + cpu: "500m" + volumeMounts: + - name: app-code + mountPath: /app + volumes: + - name: app-code + emptyDir: {} diff --git a/package-lock.json b/package-lock.json index dfc0ace..08cbc3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@woocommerce/woocommerce-rest-api": "^1.0.2", "clsx": "^2.1.1", "framer-motion": "^12.34.4", + "lucide-react": "^0.577.0", "next": "16.1.6", "next-intl": "^4.8.3", "react": "19.2.3", @@ -5615,6 +5616,15 @@ "yallist": "^3.0.2" } }, + "node_modules/lucide-react": { + "version": "0.577.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.577.0.tgz", + "integrity": "sha512-4LjoFv2eEPwYDPg/CUdBJQSDfPyzXCRrVW1X7jrx/trgxnxkHFjnVZINbzvzxjN70dxychOfg+FTYwBiS3pQ5A==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/magic-string": { "version": "0.30.21", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", diff --git a/package.json b/package.json index 8f22c46..0a4705d 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@woocommerce/woocommerce-rest-api": "^1.0.2", "clsx": "^2.1.1", "framer-motion": "^12.34.4", + "lucide-react": "^0.577.0", "next": "16.1.6", "next-intl": "^4.8.3", "react": "19.2.3", diff --git a/src/app/en/about/page.tsx b/src/app/en/about/page.tsx deleted file mode 100644 index 86afd09..0000000 --- a/src/app/en/about/page.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import Header from "@/components/layout/Header"; -import Footer from "@/components/layout/Footer"; - -export const metadata = { - title: "About - ManoonOils", - description: "Learn about ManoonOils - our story, mission, and commitment to natural beauty.", -}; - -export default function AboutPage() { - return ( -
-
- -
-
-

- Our Story -

- -
-

- ManoonOils was born from a passion for natural beauty and the belief - that the best skincare comes from nature itself. Our journey began with - a simple question: how can we create products that truly nurture both - hair and skin? -

- -

- We believe in the power of natural ingredients. Every oil in our - collection is carefully selected for its unique properties and - benefits. From nourishing oils that restore hair vitality to serums - that rejuvenate skin, we craft each product with love and attention - to detail. -

- -

- Our Mission -

-

- Our mission is to provide premium quality, natural products that - enhance your daily beauty routine. We are committed to: -

-
    -
  • Using only the finest natural ingredients
  • -
  • Cruelty-free and ethical production
  • -
  • Sustainable packaging practices
  • -
  • Transparency in our formulations
  • -
- -

- Handmade with Love -

-

- Every bottle of ManoonOils is handcrafted with care. We small-batch - produce our products to ensure the highest quality and freshness. - When you use ManoonOils, you can feel confident that you're using - something made with genuine care and expertise. -

-
-
-
- -
- ); -} diff --git a/src/app/en/contact/page.tsx b/src/app/en/contact/page.tsx deleted file mode 100644 index 3507e95..0000000 --- a/src/app/en/contact/page.tsx +++ /dev/null @@ -1,114 +0,0 @@ -"use client"; - -import { useState } from "react"; -import Header from "@/components/layout/Header"; -import Footer from "@/components/layout/Footer"; - -export default function ContactPage() { - const [formData, setFormData] = useState({ - name: "", - email: "", - message: "", - }); - const [submitted, setSubmitted] = useState(false); - - const handleSubmit = (e: React.FormEvent) => { - e.preventDefault(); - setSubmitted(true); - }; - - return ( -
-
- -
-
-

- Contact Us -

- -

- Have questions? We'd love to hear from you. -

- - {submitted ? ( -
-

Thank you for your message!

-

We'll get back to you soon.

-
- ) : ( -
-
- - setFormData({ ...formData, name: e.target.value })} - className="w-full px-4 py-3 border border-border focus:outline-none focus:border-foreground" - /> -
- -
- - setFormData({ ...formData, email: e.target.value })} - className="w-full px-4 py-3 border border-border focus:outline-none focus:border-foreground" - /> -
- -
- -