Add Docker deployment support
هذا الالتزام موجود في:
23
.dockerignore
Normal file
23
.dockerignore
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.next
|
||||||
|
.vscode
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
*.log
|
||||||
|
*.err
|
||||||
|
|
||||||
|
_portfolio_pages
|
||||||
|
dev-3001.log
|
||||||
|
dev-3004.err
|
||||||
|
dev-3004.log
|
||||||
|
dev-debug.err.log
|
||||||
|
dev-debug.log
|
||||||
|
dev-direct.log
|
||||||
|
dev-live.log
|
||||||
|
dev-portfolio.err
|
||||||
|
dev-portfolio.log
|
||||||
|
dev-session.err.log
|
||||||
|
dev-session.log
|
||||||
|
dev.log
|
||||||
|
start.log
|
||||||
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
FROM node:20-alpine AS base
|
||||||
|
WORKDIR /app
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
|
FROM base AS deps
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
FROM base AS builder
|
||||||
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM node:20-alpine AS runner
|
||||||
|
WORKDIR /app
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
ENV PORT=3000
|
||||||
|
ENV HOSTNAME=0.0.0.0
|
||||||
|
|
||||||
|
COPY --from=builder /app/public ./public
|
||||||
|
COPY --from=builder /app/.next/standalone ./
|
||||||
|
COPY --from=builder /app/.next/static ./.next/static
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["node", "server.js"]
|
||||||
@@ -3,6 +3,7 @@ const nextConfig = {
|
|||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
poweredByHeader: false,
|
poweredByHeader: false,
|
||||||
compress: true,
|
compress: true,
|
||||||
|
output: "standalone",
|
||||||
images: {
|
images: {
|
||||||
formats: ["image/avif", "image/webp"],
|
formats: ["image/avif", "image/webp"],
|
||||||
},
|
},
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم