File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed
multichannel-app/ws-bot-backend Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
Original file line number Diff line number Diff line change
1
+ FROM node:18-alpine AS build_base
2
+ RUN apk add --no-cache libc6-compat
3
+ RUN apk update
4
+ WORKDIR /app
5
+ RUN npm install turbo --global
6
+
7
+ FROM build_base AS builder
8
+
9
+ COPY . .
10
+ RUN turbo prune ws-bot-backend --docker
11
+
12
+ FROM build_base AS installer
13
+
14
+ COPY .gitignore .gitignore
15
+ COPY --from=builder /app/out/json/ .
16
+ COPY --from=builder /app/out/package-lock.json ./
17
+ RUN npm ci
18
+
19
+ COPY --from=builder /app/out/full .
20
+ COPY turbo.json turbo.json
21
+
22
+ RUN turbo run build --filter ws-bot-backend...
23
+
24
+ FROM node:18-alpine AS runner
25
+
26
+ WORKDIR /app
27
+ RUN addgroup --system --gid 1001 ws-bot-backend
28
+ RUN adduser --system --uid 1001 ws-bot-backend
29
+ USER ws-bot-backend
30
+ COPY --from=installer /app .
31
+
32
+ CMD ["node" , "multichannel-app/ws-bot-backend/dist/index.js" ]
Original file line number Diff line number Diff line change @@ -18,8 +18,15 @@ import { ChatCompletionMessageParam } from 'openai/resources';
18
18
const app = ExpressWS ( express ( ) ) . app ;
19
19
const port = process . env . WS_BOT_PORT ;
20
20
21
- const speechToTextClient = new speech . SpeechClient ( ) ;
22
- const ttsClient = new textToSpeech . TextToSpeechClient ( ) ;
21
+ const credentials = {
22
+ 'type' : 'service_account' ,
23
+ 'private_key' : process . env . GOOGLE_PRIVATE_KEY ,
24
+ 'client_email' : process . env . GOOGLE_CLIENT_EMAIL ,
25
+ 'client_id' : process . env . GOOGLE_CLIENT_ID ,
26
+ } ;
27
+
28
+ const speechToTextClient = new speech . SpeechClient ( { credentials } ) ;
29
+ const ttsClient = new textToSpeech . TextToSpeechClient ( { credentials } ) ;
23
30
24
31
const SizeChunker = chunkingStreams . SizeChunker ;
25
32
You can’t perform that action at this time.
0 commit comments