From 9bc68912795409258d9d8908651560e22acc924a Mon Sep 17 00:00:00 2001 From: DreamPeak Solutions Date: Wed, 3 Sep 2025 17:56:12 +0500 Subject: [PATCH 1/3] Update Dockerfile --- Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6507ff..c8b7193 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ -FROM quay.io/qasimtech/mega-bot:latest +FROM node:18-bullseye # works on amd64 + arm64 -RUN git clone https://github.com/GlobalTechInfo/MEGA-AI /root/mega && \ - rm -rf /root/mega/.git +WORKDIR /app -WORKDIR /root/mega -RUN npm install || yarn install +COPY package*.json ./ +RUN npm install --legacy-peer-deps + +COPY . . + +EXPOSE 3000 -EXPOSE 5000 CMD ["npm", "start"] From 72a3fe10329dd0a964ba020d2a684376d7c2adc8 Mon Sep 17 00:00:00 2001 From: DreamPeak Solutions Date: Wed, 3 Sep 2025 17:58:17 +0500 Subject: [PATCH 2/3] Update Dockerfile --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c8b7193..408a62d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ -FROM node:18-bullseye # works on amd64 + arm64 +# Use Node.js 18 base image (works on amd64 + arm64) +FROM node:18-bullseye WORKDIR /app -COPY package*.json ./ -RUN npm install --legacy-peer-deps - COPY . . -EXPOSE 3000 +RUN npm install || yarn install +EXPOSE 5000 CMD ["npm", "start"] From 32b69aa294a5aaa01c931e5ca45521258dfe515c Mon Sep 17 00:00:00 2001 From: DreamPeak Solutions Date: Wed, 3 Sep 2025 18:48:12 +0500 Subject: [PATCH 3/3] Update index.js --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 97a15e6..dc546c8 100644 --- a/index.js +++ b/index.js @@ -50,7 +50,7 @@ figlet( import rateLimit from 'express-rate-limit' const app = express() -const port = process.env.PORT || 5000 +const port = process.env.PORT || 3000 const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) @@ -58,6 +58,7 @@ const __dirname = path.dirname(__filename) app.use(express.static(path.join(__dirname, 'assets'))) app.use(bodyParser.json()) app.use(bodyParser.urlencoded({ extended: true })) +app.set('trust proxy', 1); // trust first proxy const homeLimiter = rateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes