Merge branch 'master' into feature/programmatic-seo
This commit is contained in:
@@ -10,13 +10,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Trigger BuildKit Build
|
- name: Trigger BuildKit Build
|
||||||
run: |
|
run: |
|
||||||
echo "Building commit: \"
|
|
||||||
|
|
||||||
# Delete old job
|
|
||||||
kubectl delete job build-manoon-headless-action -n gitea --ignore-not-found=true 2>/dev/null || true
|
kubectl delete job build-manoon-headless-action -n gitea --ignore-not-found=true 2>/dev/null || true
|
||||||
|
|
||||||
# Create build job
|
cat << 'JOBEOF' | kubectl apply -f -
|
||||||
kubectl apply -f - << EOF
|
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
@@ -30,33 +26,31 @@ jobs:
|
|||||||
initContainers:
|
initContainers:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: alpine/git:latest
|
image: alpine/git:latest
|
||||||
command:
|
command: ["sh", "-c"]
|
||||||
- sh
|
args:
|
||||||
- -c
|
- git clone --depth 1 http://gitea:3000/unchained/manoon-headless.git /workspace
|
||||||
- |
|
|
||||||
set -e
|
|
||||||
git clone --depth 1 http://gitea:3000/unchained/manoon-headless.git /workspace
|
|
||||||
cd /workspace && git checkout echo "Building: $(git rev-parse --short HEAD)"
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: workspace
|
- name: workspace
|
||||||
mountPath: /workspace
|
mountPath: /workspace
|
||||||
containers:
|
containers:
|
||||||
- name: build
|
- name: build
|
||||||
image: moby/buildkit:latest
|
image: moby/buildkit:latest
|
||||||
command:
|
command: ["sh", "-c"]
|
||||||
- sh
|
args:
|
||||||
- -c
|
- |
|
||||||
- |
|
mkdir -p /root/.docker
|
||||||
set -e
|
cp /docker-config/.dockerconfigjson /root/.docker/config.json
|
||||||
mkdir -p /root/.docker
|
buildctl --addr tcp://buildkit.gitea.svc.cluster.local:1234 build \
|
||||||
cp /docker-config/.dockerconfigjson /root/.docker/config.json
|
--frontend dockerfile.v0 \
|
||||||
buildctl --addr tcp://buildkit.gitea.svc.cluster.local:1234 build \
|
--local context=/workspace \
|
||||||
--frontend dockerfile.v0 \
|
--local dockerfile=/workspace \
|
||||||
--local context=/workspace \
|
--opt build-arg:NEXT_PUBLIC_SALEOR_API_URL=https://api.manoonoils.com/graphql/ \
|
||||||
--local dockerfile=/workspace \
|
--opt build-arg:NEXT_PUBLIC_SITE_URL=https://manoonoils.com \
|
||||||
--output type=image,name=ghcr.io/unchainedio/manoon-headless:latest,push=true
|
--opt build-arg:NEXT_PUBLIC_OPENPANEL_CLIENT_ID=fa61f8ae-0b5d-4187-a9b1-5a04b0025674 \
|
||||||
kubectl annotate kustomization -n flux-system manoonoils-storefront --overwrite reconcile.fluxcd.io/requestedAt="\1775369769"
|
--opt build-arg:NEXT_PUBLIC_RYBBIT_HOST=https://rybbit.nodecrew.me \
|
||||||
echo "Done!"
|
--opt build-arg:NEXT_PUBLIC_RYBBIT_SITE_ID=1 \
|
||||||
|
--no-cache \
|
||||||
|
--output type=image,name=ghcr.io/unchainedio/manoon-headless:latest,push=true
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: workspace
|
- name: workspace
|
||||||
mountPath: /workspace
|
mountPath: /workspace
|
||||||
@@ -69,7 +63,6 @@ jobs:
|
|||||||
- name: docker-config
|
- name: docker-config
|
||||||
secret:
|
secret:
|
||||||
secretName: ghcr-pull-secret
|
secretName: ghcr-pull-secret
|
||||||
EOF
|
JOBEOF
|
||||||
|
|
||||||
echo "Build job created!"
|
echo "Build triggered!"
|
||||||
kubectl wait --for=condition=complete job/build-manoon-headless-action -n gitea --timeout=600s || echo "Build running in background"
|
|
||||||
|
|||||||
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
|
||||||
|
|||||||
@@ -40,3 +40,5 @@ Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/bui
|
|||||||
// 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 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
|
||||||
|
|||||||
Reference in New Issue
Block a user