commit 893cdcb89c6978ecbf232395d19e8f088ab52437 Author: soheil khaledabadi Date: Fri Apr 24 16:20:36 2026 +0330 Init(Coore): add to repo diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1744d98 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.git +.gitignore +.next +node_modules +npm-debug.log* +README.md +.DS_Store +.env*.local +.dockerignore +Dockerfile +docker-compose.yml diff --git a/.env b/.env new file mode 100644 index 0000000..7b4a416 --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +NEXT_PUBLIC_API_BASE_URL=http://cms.soheilkhaledabadi.ir +NEXT_PUBLIC_IMAGE_HOSTNAME=axicon-portal.iran.liara.run +ARVAN_NAMESPACE=docker.arvancloud.ir +IMAGE_TAG=latest diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..55886b3 --- /dev/null +++ b/.env.example @@ -0,0 +1,11 @@ +# API base URL (backend CMS) +NEXT_PUBLIC_API_BASE_URL=https://your-api-domain.com + +# Hostname of the image server returned by the API (for Next.js Image optimization) +NEXT_PUBLIC_IMAGE_HOSTNAME=your-image-cdn-domain.com + +# ArvanCloud Container Registry namespace +ARVAN_NAMESPACE=your-arvan-namespace + +# Docker image tag (default: latest) +IMAGE_TAG=latest diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100755 index 0000000..bffb357 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..8f322f0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1c1f732 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,50 @@ +# syntax=docker/dockerfile:1 + +ARG REGISTRY=docker.arvancloud.ir + +# Stage 1: deps +FROM ${REGISTRY}/node:20-alpine AS deps +WORKDIR /app + +# اصلاح mirror برای جلوگیری از TLS error +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories + +COPY package.json package-lock.json ./ +RUN npm ci --prefer-offline --no-audit + +# Stage 2: builder +FROM ${REGISTRY}/node:20-alpine AS builder +WORKDIR /app + +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories + +COPY --from=deps /app/node_modules ./node_modules +COPY . . + +ENV NEXT_TELEMETRY_DISABLED=1 + +RUN npm run build + +# Stage 3: runner +FROM ${REGISTRY}/node:20-alpine AS runner +WORKDIR /app + +ENV NODE_ENV=production +ENV NEXT_TELEMETRY_DISABLED=1 + +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories + +RUN addgroup -S nodejs -g 1001 +RUN adduser -S nextjs -u 1001 + +COPY --from=builder /app/public ./public +COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static + +USER nextjs + +EXPOSE 3000 +ENV PORT=3000 +ENV HOSTNAME=0.0.0.0 + +CMD ["node", "server.js"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100755 index 0000000..e5f733e --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/app/[lang]/layout.js b/app/[lang]/layout.js new file mode 100755 index 0000000..6419a38 --- /dev/null +++ b/app/[lang]/layout.js @@ -0,0 +1,63 @@ +import '../globals.css' +import localFont from 'next/font/local' +import Header from '@/components/Header' +import Footer from '@/components/Footer' +import {Providers} from "../providers"; + + +const dana = localFont({ + src: [ + { + style: 'normal', + weight: '2', + path: '../fonts/dana-bold.woff2' + }, + { + style: 'normal', + weight: '1', + path: '../fonts/Doran-Bold.woff2' + }, + { + style: 'normal', + weight: 'bold', + path: '../fonts/Morabba-Bold.woff2' + }, + { + style: 'normal', + weight: 'normal', + path: '../fonts/Morabba-Regular.woff2' + }, + { + style: 'normal', + weight: '4', + path: '../fonts/is1.woff2' + }, + { + style: 'normal', + weight: '5', + path: '../fonts/is2.woff2' + }, + ] +}) + + + +export const metadata = { + title: 'Rahavard | رهاورد', + description: 'شرکت دانش بنیان مهندسی رهاورد منیزیم پارسه', +} +export const dynamic = 'force-dynamic'; + +export default function RootLayout({ params: { lang }, children }) { + return ( + + + +
+ {children} +