Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM quay.io/qasimtech/mega-bot:latest
# Use Node.js 18 base image (works on amd64 + arm64)
FROM node:18-bullseye

RUN git clone https://github.com/GlobalTechInfo/MEGA-AI /root/mega && \
rm -rf /root/mega/.git
WORKDIR /app

COPY . .

WORKDIR /root/mega
RUN npm install || yarn install

EXPOSE 5000
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ 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)

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
Expand Down
Loading