Skip to content

Commit

Permalink
add support for LLM-enabled dialog manager + fix configuration with e…
Browse files Browse the repository at this point in the history
…nv variables
  • Loading branch information
bfleisch committed Oct 1, 2024
1 parent b9bfade commit f537a85
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 31 deletions.
40 changes: 27 additions & 13 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,41 @@ jobs:

- name: Build and push the Docker image
uses: docker/build-push-action@v2
env:
REACT_APP_ISEE_API: https://api-dev.isee4xai.com/api
REACT_APP_ISEE_ONTOAPI: https://api-onto-dev.isee4xai.com/api
with:
push: true
file: Dockerfile.dev
tags: isee4xai/cockpit:dev
build-args: |
REACT_APP_ISEE_API=https://api-dev.isee4xai.com/api
REACT_APP_ISEE_ONTOAPI= https://api-onto-dev.isee4xai.com/api
UMI_APP_API_URL="https://api-dev.isee4xai.com/api"
UMI_APP_ONTOAPI_URL="https://api-onto-dev.isee4xai.com/api"
UMI_APP_WS_URL="wss://dialog-dev.isee4xai.com/ws/"
UMI_APP_EDITOR_URL="https://editor-dev.isee4xai.com/"
- name: Build and push the Docker image (with LLM-enabled Dialog Manager)
uses: docker/build-push-action@v2
with:
push: true
file: Dockerfile.dev
tags: isee4xai/cockpit-llm:dev
build-args: |
UMI_APP_API_URL="https://api-dev.isee4xai.com/api"
UMI_APP_ONTOAPI_URL="https://api-onto-dev.isee4xai.com/api"
UMI_APP_WS_URL="wss://dialog-llm-dev.isee4xai.com/ws/"
UMI_APP_EDITOR_URL="https://editor-dev.isee4xai.com/"

deploy:
needs: build
runs-on: ubuntu-latest
name: Deploy on dev platform

steps:
- uses: distributhor/workflow-webhook@v2
env:
webhook_url: ${{ secrets.WEBHOOK_URL_DEV }}
webhook_secret: ${{ secrets.WEBHOOK_TOKEN_DEV }}
data: '{"DOCKER_SERVICE":"cockpit"}'
webhook_type: 'json-extended'

- name: Deploy on dev platform
uses: distributhor/workflow-webhook@v2
with:
env:
webhook_url: ${{ secrets.WEBHOOK_URL_DEV }}
webhook_secret: ${{ secrets.WEBHOOK_TOKEN_DEV }}
data: '{"DOCKER_SERVICE":"cockpit cockpit-llm"}'
webhook_type: 'json-extended'


11 changes: 5 additions & 6 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ FROM node:16-alpine as builder
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH

#ARG REACT_APP_ISEE_API
ENV REACT_APP_ISEE_API=https://api-dev.isee4xai.com/api

#ARG REACT_APP_ISEE_ONTOAPI
ENV REACT_APP_ISEE_ONTOAPI=https://api-onto-dev.isee4xai.com/api
ARG UMI_APP_API_URL="https://api-dev.isee4xai.com/api"
ARG UMI_APP_ONTOAPI_URL="https://api-onto-dev.isee4xai.com/api"
ARG UMI_APP_WS_URL="wss://dialog-dev.isee4xai.com/ws/"
ARG UMI_APP_EDITOR_URL="https://editor-dev.isee4xai.com/"

COPY package.json ./
RUN npm i
COPY . ./
RUN cross-env REACT_APP_ISEE_API=https://api-dev.isee4xai.com/api REACT_APP_ISEE_ONTOAPI=https://api-onto-dev.isee4xai.com/api npm run build
RUN npm run build

# production environment
FROM nginx:stable-alpine
Expand Down
16 changes: 4 additions & 12 deletions src/services/isee/api.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
export const BASE_URL = process.env.NODE_ENV === 'production' ?
'https://api-dev.isee4xai.com/api'
: 'http://localhost:3000/api';
export const BASE_URL = process.env.UMI_APP_API_URL || 'http://localhost:3000/api';
export const ONTOAPI_URL = process.env.UMI_APP_ONTOAPI_URL || 'http://localhost:3100/api';
export const WS_URL = process.env.UMI_APP_WS_URL || 'ws://127.0.0.1:8000/ws/';
export const EDITOR_URL = process.env.UMI_APP_EDITOR_URL || "https://editor-dev.isee4xai.com/";

export const ONTOAPI_URL = process.env.NODE_ENV === 'production'
? 'https://api-onto-dev.isee4xai.com/api'
: 'http://localhost:3100/api';

export const WS_URL = process.env.NODE_ENV === 'production'
? 'wss://dialog-dev.isee4xai.com/ws/'
: 'ws://127.0.0.1:8000/ws/';

export const EDITOR_URL = "https://editor-dev.isee4xai.com/";

0 comments on commit f537a85

Please sign in to comment.