File tree Expand file tree Collapse file tree 3 files changed +42
-7
lines changed
client/src/components/Messages Expand file tree Collapse file tree 3 files changed +42
-7
lines changed Original file line number Diff line number Diff line change
1
+ # ./Dockerfile
2
+
3
+ FROM node:19-alpine
4
+ WORKDIR /app
5
+
6
+ # Copy package.json files for client and api
7
+ COPY /client/package*.json /app/client/
8
+ COPY /api/package*.json /app/api/
9
+
10
+ # Install dependencies for both client and api
11
+ RUN cd /app/client && npm ci
12
+ RUN cd /app/api && npm ci
13
+
14
+ # Copy the current directory contents into the container
15
+ COPY /client/ /app/client/
16
+ COPY /api/ /app/api/
17
+
18
+ # Set the memory limit for Node.js
19
+ ENV NODE_OPTIONS="--max-old-space-size=2048"
20
+
21
+ # Build webpack artifacts for the client
22
+ RUN cd /app/client && npm run build
23
+
24
+ # Create the necessary directory and copy the client side code to the api directory
25
+ RUN mkdir -p /app/api/client && cp -R /app/client/dist /app/api/client/dist
26
+
27
+ # Make port 3080 available to the world outside this container
28
+ EXPOSE 3080
29
+
30
+ # Expose the server to 0.0.0.0
31
+ ENV HOST=0.0.0.0
32
+
33
+ # Run the app when the container launches
34
+ WORKDIR /app/api
35
+ CMD ["npm", "start"]
Original file line number Diff line number Diff line change @@ -150,9 +150,8 @@ export default function Message({
150
150
) : edit ? (
151
151
< div className = "flex min-h-[20px] flex-grow flex-col items-start gap-4 " >
152
152
{ /* <div className={`${blinker ? 'result-streaming' : ''} markdown prose dark:prose-invert light w-full break-words`}> */ }
153
-
154
153
< div
155
- className = "markdown prose dark:prose-invert light w-full break-words border-none focus:outline-none"
154
+ className = "markdown prose dark:prose-invert light w-full whitespace-pre-wrap break-words border-none focus:outline-none"
156
155
contentEditable = { true }
157
156
ref = { textEditor }
158
157
suppressContentEditableWarning = { true }
Original file line number Diff line number Diff line change @@ -15,13 +15,14 @@ services:
15
15
# - api
16
16
api :
17
17
ports :
18
- - 3080:3080 # Change it to 9000:3080 if you want to use nginx
18
+ - 3080:3080 # Change it to 9000:3080 to use nginx
19
19
depends_on :
20
20
- mongodb
21
- image : node-api
22
- build :
23
- context : .
24
- target : node-api
21
+ # image: node-api # Uncomment this to build from local file
22
+ # build:
23
+ # context: .
24
+ # target: node-api
25
+ image : chatgptclone/app:0.3.3 # Comment this & uncomment above to build from local file
25
26
restart : always
26
27
env_file :
27
28
- ./api/.env
You can’t perform that action at this time.
0 commit comments