try to setup demo

This commit is contained in:
Dobromir Popov 2024-06-15 17:32:12 +03:00
parent 98ae4f5e99
commit bab8528db1
7 changed files with 20 additions and 11 deletions

View File

@ -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
SERVER_PORT_HTTP=28080
SERVER_PORT_WS=28081

1
.gitignore vendored
View File

@ -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/*

View File

@ -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"]

View File

@ -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:

View File

@ -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:

View File

@ -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) => {

View File

@ -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"]