diff --git a/.env.demo b/.env.demo index fea3dc7..2989d1a 100644 --- a/.env.demo +++ b/.env.demo @@ -17,7 +17,7 @@ LNN_API_URL=https://ollama.d-popov.com/api/generate GROQ_API_KEY=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 OPENAI_API_KEY=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 -WS_URL=wss://tts.d-popov.com +PUBLIC_WS_URL=wss://ws.tts.d-popov.com PUBLIC_HOSTNAME=tts.d-popov.com -SERVER_PORT_HTTP=8080 -SERVER_PORT_WS=8081 \ No newline at end of file +SERVER_PORT_HTTP=28080 +SERVER_PORT_WS=28081 \ No newline at end of file diff --git a/.gitignore b/.gitignore index b6c8ffa..6bc38ed 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ agent-mobile/artimobile/supervisord.pid agent-pyter/lag-llama agent-pyter/google-chrome-stable_current_amd64.deb web/.node-persist/* +.node-persist/storage/* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 3cb3638..5cb5705 100644 --- a/Dockerfile +++ b/Dockerfile @@ -90,5 +90,6 @@ RUN . /venv/bin/activate && pip install --upgrade pip && pip install -r agent-py # CMD ["npm", "start"] -CMD ["npm", "run", "start:demo"] +# CMD ["npm", "run", "start:demo"] +CMD ["npm", "run", "start:demo-chat"] #CMD ["npm", "run", "start:tele"] \ No newline at end of file diff --git a/_doc/_notes/readme.md b/_doc/_notes/readme.md index 25e9ed8..1179cb1 100644 --- a/_doc/_notes/readme.md +++ b/_doc/_notes/readme.md @@ -1,3 +1,7 @@ +# .10: /mnt/apps/DEV/REPOS/git.d-popov.com/ai-kevin/ +# run +export NODE_ENV=demo && npm run start:demo-chat + # build: docker build -t kevin-ai . # start the project in container: diff --git a/docker-compose.demo.yml b/docker-compose.demo.yml index 0cc78d3..0b97d0c 100644 --- a/docker-compose.demo.yml +++ b/docker-compose.demo.yml @@ -7,7 +7,8 @@ services: context: . dockerfile: web/deploy/demo.Dockerfile ports: - - "8880:8080" # Exposes port 3000 on the host and maps it to port 3000 on the container + - "28880:8080" + - "28881:8081" volumes: - .:/usr/src/app # Mounts the current directory to /usr/src/app in the container environment: diff --git a/web/chat-server.js b/web/chat-server.js index 6585318..8cf4449 100644 --- a/web/chat-server.js +++ b/web/chat-server.js @@ -343,11 +343,11 @@ app.post('/log', (req, res) => { }); app.get('/wsurl', (req, res) => { - if(process.env.PUBLIC_HOSTNAME){ - process.env.WS_URL = `wss://${process.env.PUBLIC_HOSTNAME}` - } - console.log('Request for WS URL resolved with:', process.env.WS_URL ); - res.status(200).send(process.env.WS_URL); + // if(process.env.PUBLIC_HOSTNAME){ + // process.env.WS_URL = `wss://${process.env.PUBLIC_HOSTNAME}` + // } + console.log('Request for WS URL resolved with:', process.env.PUBLIC_WS_URL ); + res.status(200).send(process.env.PUBLIC_WS_URL); }); app.get('/settings', async (req, res) => { diff --git a/web/deploy/demo.Dockerfile b/web/deploy/demo.Dockerfile index 484a3ad..48a281c 100644 --- a/web/deploy/demo.Dockerfile +++ b/web/deploy/demo.Dockerfile @@ -4,6 +4,8 @@ FROM node:20 # Create and change to the app directory WORKDIR /usr/src/app +ENV NODE_ENV=demo + # Copy the package.json and package-lock.json files COPY package*.json ./ @@ -13,8 +15,8 @@ RUN npm install # Copy the rest of the application code COPY . . -# Expose port 3000 EXPOSE 8880 +EXPOSE 8881 # Start the application CMD ["npm", "run", "start:demo-chat"]