Compare commits
30 Commits
feature/em
...
feature/pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cca6f44139 | ||
|
|
2097280f20 | ||
|
|
bea6aba014 | ||
|
|
8454ffc5b3 | ||
|
|
38defdfb9b | ||
|
|
9c04dffa46 | ||
|
|
bd1fa0d96a | ||
|
|
826d1ebb46 | ||
|
|
09b0614695 | ||
|
|
7c7611b723 | ||
|
|
6563f0c966 | ||
|
|
cdbcd8424b | ||
|
|
05b2c26634 | ||
|
|
bdc35ff2b4 | ||
|
|
d53665d6da | ||
|
|
f6cdcd86df | ||
|
|
80da03504c | ||
|
|
328bbbaaa2 | ||
|
|
6a05abc6de | ||
|
|
9058002f8d | ||
|
|
37d1894ad4 | ||
|
|
6236092d77 | ||
|
|
61b20beffa | ||
|
|
29894cd555 | ||
|
|
c80970bcda | ||
|
|
1dec08f857 | ||
|
|
cc33d317ba | ||
|
|
3c495f48b7 | ||
|
|
590b6ca6ea | ||
|
|
a636d29f0b |
68
.gitea/workflows/build.yaml
Normal file
68
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
name: Build and Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master, main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Trigger BuildKit Build
|
||||||
|
run: |
|
||||||
|
kubectl delete job build-manoon-headless-action -n gitea --ignore-not-found=true 2>/dev/null || true
|
||||||
|
|
||||||
|
cat << 'JOBEOF' | kubectl apply -f -
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: build-manoon-headless-action
|
||||||
|
namespace: gitea
|
||||||
|
spec:
|
||||||
|
ttlSecondsAfterFinished: 86400
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
initContainers:
|
||||||
|
- name: clone
|
||||||
|
image: alpine/git:latest
|
||||||
|
command: ["sh", "-c"]
|
||||||
|
args:
|
||||||
|
- git clone --depth 1 http://gitea:3000/unchained/manoon-headless.git /workspace
|
||||||
|
volumeMounts:
|
||||||
|
- name: workspace
|
||||||
|
mountPath: /workspace
|
||||||
|
containers:
|
||||||
|
- name: build
|
||||||
|
image: moby/buildkit:latest
|
||||||
|
command: ["sh", "-c"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
mkdir -p /root/.docker
|
||||||
|
cp /docker-config/.dockerconfigjson /root/.docker/config.json
|
||||||
|
buildctl --addr tcp://buildkit.gitea.svc.cluster.local:1234 build \
|
||||||
|
--frontend dockerfile.v0 \
|
||||||
|
--local context=/workspace \
|
||||||
|
--local dockerfile=/workspace \
|
||||||
|
--opt build-arg:NEXT_PUBLIC_SALEOR_API_URL=https://api.manoonoils.com/graphql/ \
|
||||||
|
--opt build-arg:NEXT_PUBLIC_SITE_URL=https://manoonoils.com \
|
||||||
|
--opt build-arg:NEXT_PUBLIC_OPENPANEL_CLIENT_ID=fa61f8ae-0b5d-4187-a9b1-5a04b0025674 \
|
||||||
|
--opt build-arg:NEXT_PUBLIC_RYBBIT_HOST=https://rybbit.nodecrew.me \
|
||||||
|
--opt build-arg:NEXT_PUBLIC_RYBBIT_SITE_ID=1 \
|
||||||
|
--no-cache \
|
||||||
|
--output type=image,name=ghcr.io/unchainedio/manoon-headless:latest,push=true
|
||||||
|
volumeMounts:
|
||||||
|
- name: workspace
|
||||||
|
mountPath: /workspace
|
||||||
|
- name: docker-config
|
||||||
|
mountPath: /docker-config
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: workspace
|
||||||
|
emptyDir: {}
|
||||||
|
- name: docker-config
|
||||||
|
secret:
|
||||||
|
secretName: ghcr-pull-secret
|
||||||
|
JOBEOF
|
||||||
|
|
||||||
|
echo "Build triggered!"
|
||||||
17
Dockerfile
17
Dockerfile
@@ -1,17 +1,25 @@
|
|||||||
# Multi-stage build for Next.js
|
|
||||||
FROM node:20-slim AS builder
|
FROM node:20-slim AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package files
|
ARG NEXT_PUBLIC_SALEOR_API_URL
|
||||||
|
ARG NEXT_PUBLIC_SITE_URL
|
||||||
|
ARG NEXT_PUBLIC_OPENPANEL_CLIENT_ID
|
||||||
|
ARG NEXT_PUBLIC_RYBBIT_HOST
|
||||||
|
ARG NEXT_PUBLIC_RYBBIT_SITE_ID
|
||||||
|
|
||||||
|
ENV NEXT_PUBLIC_SALEOR_API_URL=${NEXT_PUBLIC_SALEOR_API_URL}
|
||||||
|
ENV NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL}
|
||||||
|
ENV NEXT_PUBLIC_OPENPANEL_CLIENT_ID=${NEXT_PUBLIC_OPENPANEL_CLIENT_ID}
|
||||||
|
ENV NEXT_PUBLIC_RYBBIT_HOST=${NEXT_PUBLIC_RYBBIT_HOST}
|
||||||
|
ENV NEXT_PUBLIC_RYBBIT_SITE_ID=${NEXT_PUBLIC_RYBBIT_SITE_ID}
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install --prefer-offline --no-audit
|
RUN npm install --prefer-offline --no-audit
|
||||||
|
|
||||||
# Copy source and build
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Production stage
|
|
||||||
FROM node:20-slim AS runner
|
FROM node:20-slim AS runner
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -20,7 +28,6 @@ ENV NODE_ENV=production
|
|||||||
ENV PORT=3000
|
ENV PORT=3000
|
||||||
ENV HOSTNAME=0.0.0.0
|
ENV HOSTNAME=0.0.0.0
|
||||||
|
|
||||||
# Copy necessary files from builder
|
|
||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
COPY --from=builder /app/.next/standalone ./
|
COPY --from=builder /app/.next/standalone ./
|
||||||
COPY --from=builder /app/.next/static ./.next/static
|
COPY --from=builder /app/.next/static ./.next/static
|
||||||
|
|||||||
@@ -39,3 +39,6 @@ Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/bui
|
|||||||
// Auto-deploy test: 2026-03-07T09:02:49Z
|
// Auto-deploy test: 2026-03-07T09:02:49Z
|
||||||
// Auto-deploy test: 2026-03-07T10:33:23Z
|
// Auto-deploy test: 2026-03-07T10:33:23Z
|
||||||
// Auto-deploy test 2: 2026-03-07T10:37:05Z
|
// Auto-deploy test 2: 2026-03-07T10:37:05Z
|
||||||
|
# Trigger build Sun Apr 5 06:32:05 AM EET 2026
|
||||||
|
# Trigger build with env vars Sun Apr 5 08:45:00 AM EET 2026
|
||||||
|
# Build test Sun Apr 5 12:59:49 PM EET 2026
|
||||||
|
|||||||
@@ -13,102 +13,16 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: storefront
|
app: storefront
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
imagePullSecrets:
|
||||||
- name: clone
|
- name: ghcr-pull-secret
|
||||||
image: alpine/git:latest
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
set -e
|
|
||||||
apk add --no-cache git
|
|
||||||
git clone --depth 1 --branch master \
|
|
||||||
http://gitea.gitea.svc.cluster.local:3000/unchained/manoon-headless.git \
|
|
||||||
/workspace
|
|
||||||
echo "Clone complete."
|
|
||||||
volumeMounts:
|
|
||||||
- name: workspace
|
|
||||||
mountPath: /workspace
|
|
||||||
securityContext:
|
|
||||||
runAsUser: 0
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 500m
|
|
||||||
memory: 256Mi
|
|
||||||
- name: install
|
|
||||||
image: node:20-slim
|
|
||||||
workingDir: /workspace
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
set -e
|
|
||||||
echo "Installing dependencies..."
|
|
||||||
npm install --prefer-offline --no-audit 2>&1
|
|
||||||
echo "Dependencies installed."
|
|
||||||
volumeMounts:
|
|
||||||
- name: workspace
|
|
||||||
mountPath: /workspace
|
|
||||||
securityContext:
|
|
||||||
runAsUser: 0
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 2000m
|
|
||||||
memory: 3Gi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 1Gi
|
|
||||||
- name: build
|
|
||||||
image: node:20-slim
|
|
||||||
workingDir: /workspace
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
set -e
|
|
||||||
echo "Building Next.js app..."
|
|
||||||
npm run build
|
|
||||||
echo "Build complete!"
|
|
||||||
env:
|
|
||||||
- name: NODE_ENV
|
|
||||||
value: "production"
|
|
||||||
- name: NEXT_PUBLIC_SALEOR_API_URL
|
|
||||||
value: "https://api.manoonoils.com/graphql/"
|
|
||||||
- name: NEXT_PUBLIC_SITE_URL
|
|
||||||
value: "https://manoonoils.com"
|
|
||||||
- name: DASHBOARD_URL
|
|
||||||
value: "https://dashboard.manoonoils.com"
|
|
||||||
- name: NEXT_PUBLIC_OPENPANEL_CLIENT_ID
|
|
||||||
value: "fa61f8ae-0b5d-4187-a9b1-5a04b0025674"
|
|
||||||
- name: OPENPANEL_CLIENT_SECRET
|
|
||||||
value: "91126be0d1e78e657e0427df82733832.c6d30edf6ee673da9650a883604169a13ab8579a0dde70cb39b477f4cf441f90"
|
|
||||||
- name: OPENPANEL_API_URL
|
|
||||||
value: "https://op.nodecrew.me/api"
|
|
||||||
- name: MAUTIC_CLIENT_ID
|
|
||||||
value: "2_23cgmaqef8kgg8oo4kggc0w4wccwoss8o8w48o8sc40cowgkkg"
|
|
||||||
- name: MAUTIC_CLIENT_SECRET
|
|
||||||
value: "4k8367ab306co48c4c8g8sco8cgcwwww044gwccs0o0c8w4gco"
|
|
||||||
- name: MAUTIC_API_URL
|
|
||||||
value: "https://mautic.nodecrew.me"
|
|
||||||
volumeMounts:
|
|
||||||
- name: workspace
|
|
||||||
mountPath: /workspace
|
|
||||||
securityContext:
|
|
||||||
runAsUser: 0
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 2000m
|
|
||||||
memory: 2Gi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 512Mi
|
|
||||||
containers:
|
containers:
|
||||||
- name: storefront
|
- name: storefront
|
||||||
image: node:20-slim
|
image: ghcr.io/unchainedio/manoon-headless:latest # {"": "flux-system:manoon-headless"}
|
||||||
workingDir: /workspace
|
imagePullPolicy: Always
|
||||||
command:
|
command:
|
||||||
- npm
|
- node
|
||||||
- start
|
- server.js
|
||||||
|
workingDir: /app
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
env:
|
env:
|
||||||
@@ -169,10 +83,3 @@ spec:
|
|||||||
port: 3000
|
port: 3000
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
volumeMounts:
|
|
||||||
- name: workspace
|
|
||||||
mountPath: /workspace
|
|
||||||
volumes:
|
|
||||||
- name: workspace
|
|
||||||
emptyDir:
|
|
||||||
sizeLimit: 2Gi
|
|
||||||
|
|||||||
@@ -5,6 +5,3 @@ resources:
|
|||||||
- service.yaml
|
- service.yaml
|
||||||
- middleware.yaml
|
- middleware.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
images:
|
|
||||||
- name: ghcr.io/unchainedio/manoon-headless
|
|
||||||
newTag: 2c27fc6 # Updated by GitHub Actions
|
|
||||||
|
|||||||
Reference in New Issue
Block a user