diff --git a/.env b/.env deleted file mode 100644 index 330af91..0000000 --- a/.env +++ /dev/null @@ -1,27 +0,0 @@ -NODE_ENV="development" -NEXT_PUBLIC_SERVER_URL=http://192.168.88.17:32770 -NEXT_PUBLIC_PUBLIC_URL=http://192.168.88.17:32770 -NEXT_PUBLIC_API_URL=http://192.168.88.17:32770/api -NEXT_PUBLIC_STORAGE_URL=http://storage.vesmook.com -NEXT_PUBLIC_PACKAGE_VERSION=0.1.2 - - -# SECURE_LOCAL_STORAGE_HASH_KEY=f1da2b2c7a4c446934267fea631102ec389b5b99 -# NEXT_PUBLIC_API_URL_IMAGE=https://192.168.88.12:49154/Files/ReportImages -# NEXT_PUBLIC_API_URL_BackUp=https://192.168.88.12:49154/Files/BackUps - -# NEXT_PUBLIC_SERVER_URL=https://j3884z97-32769.euw.devtunnels.ms -# NEXT_PUBLIC_PUBLIC_URL=https://j3884z97-32769.euw.devtunnels.ms -# NEXT_PUBLIC_API_URL=https://j3884z97-32769.euw.devtunnels.ms/api - - - -# NEXT_PUBLIC_SERVER_URL=https://api.vesmook.com -# NEXT_PUBLIC_PUBLIC_URL=https://api.vesmook.com -# NEXT_PUBLIC_API_URL=https://api.vesmook.com/api -# NEXT_PUBLIC_STORAGE_URL=http://storage.vesmook.com -# NEXT_PUBLIC_PACKAGE_VERSION=0.1.2 - - -# NEXT_PUBLIC_API_URL_IMAGE=https://api.macsonline.ir/Files/ReportImages -# NEXT_PUBLIC_API_URL_BackUp=https://api.macsonline.ir/Files/BackUps \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2f9ce68 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM node:20-alpine3.18 AS deps +RUN apk add --no-cache libc6-compat +RUN npm install -g pnpm +WORKDIR /app +COPY package.json ./ +RUN npm install --force --production + + +FROM node:20-alpine3.18 AS builder +WORKDIR /app +ARG NODE_ENV=production +COPY . . +COPY --from=deps /app/node_modules ./node_modules +RUN npm run build + + +FROM node:20-alpine3.18 AS runner +WORKDIR /app +ARG NODE_ENV=production +COPY --from=builder /app/public ./public +COPY --from=builder /app/.next ./.next +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/package.json ./package.json +COPY --from=builder /app/.env.production ./.env.production +COPY --from=builder /app/next.config.js ./next.config.js + +EXPOSE 3000 +ENV PORT 3000 +CMD ["node_modules/.bin/next", "start"] \ No newline at end of file