Skip to content

Commit

Permalink
fix(chat): increase max headers size (Issue #2852) (#2871)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Kezik authored Jan 22, 2025
1 parent 6bfc81b commit 75ce3ae
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
6 changes: 4 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.env
.env.local
node_modules
test-results
e2e
helm
.next
.env
.env.local
.git
docs
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ RUN node tools/patch-nextjs.js
FROM node:20-alpine AS production
WORKDIR /app
COPY --from=run_dependencies /app/dist/apps/chat ./
COPY --from=run_dependencies /app/startup.sh ./startup.sh

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_OPTIONS="${NODE_OPTIONS} --max-http-header-size=32768"
ENV KEEP_ALIVE_TIMEOUT=61000

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
Expand All @@ -39,4 +40,4 @@ USER nextjs
EXPOSE 3000 9464

# Start the application
CMD ["/app/startup.sh"]
CMD ["npm", "start", "--", "--keepAliveTimeout", "$KEEP_ALIVE_TIMEOUT"]
28 changes: 14 additions & 14 deletions apps/chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,29 @@ Once you have Node.js and npm installed, follow these steps to set up your devel

1. Clone the AI DIAL Chat repository:

```
git clone https://github.com/epam/ai-dial-chat.git
```
```bash
git clone https://github.com/epam/ai-dial-chat.git
```

2. Install project dependencies:

```bash
npm install
```
```bash
npm install
```

3. Create `.env.local` file in the `\apps\chat` project directory and add the required variables with appropriate values. These three are the only required environment variables. Refer to [Environment Variables](#environment-variables) to learn more.

```
DIAL_API_HOST="ADD_VALUE_HERE"
DIAL_API_KEY="ADD_VALUE_HERE"
NEXTAUTH_SECRET="ADD_VALUE_HERE"
```
```bash
DIAL_API_HOST="ADD_VALUE_HERE"
DIAL_API_KEY="ADD_VALUE_HERE"
NEXTAUTH_SECRET="ADD_VALUE_HERE"
```

4. To start the development server, run:

```bash
npm run nx serve chat
```
```bash
npm run nx serve chat
```

Once the server is up and running, open `http://localhost:3000` in your browser to view the AI DIAL Chat application.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.24.0-rc",
"private": true,
"scripts": {
"nx": "nx",
"nx": "NODE_OPTIONS='--max-http-header-size=32768' nx",
"postinstall": "patch-package && node tools/patch-nextjs.js",
"graph": "nx graph",
"build": "nx run-many -t build",
Expand Down
5 changes: 0 additions & 5 deletions startup.sh

This file was deleted.

0 comments on commit 75ce3ae

Please sign in to comment.