Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GML-1774: avoid using hardcoded ip #211

Merged
merged 5 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion copilot-ui/src/actions/ActionProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {createClientMessage} from 'react-chatbot-kit';
import useWebSocket, {ReadyState} from 'react-use-websocket';
import Loader from '../components/Loader';

const WS_URL = "ws://0.0.0.0:8000/ui/Demo_Graph1/chat";
const WS_URL = "/ui/Transaction_Fraud/chat";

interface ActionProviderProps {
createChatBotMessage: any;
Expand Down
2 changes: 1 addition & 1 deletion copilot-ui/src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const formSchema = z.object({

// TODO
// const AuthContext = createContext();
const WS_URL = "http://0.0.0.0:8000/ui/ui-login";
const WS_URL = "/ui/ui-login";

export function Login() {
const { i18n, t } = useTranslation();
Expand Down
28 changes: 27 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ services:
DB_CONFIG: "/code/configs/db_config.json"
MILVUS_CONFIG: "/code/configs/milvus_config.json"
LOGLEVEL: "INFO"
USE_CYPHER: "false"
USE_CYPHER: "true"
volumes:
- ./configs/:/code/configs
- ./common:/code/common
networks:
- copilot_local

eventual-consistency-service:
image: tigergraphml/ecc:latest
container_name: eventual-consistency-service
Expand All @@ -35,6 +38,9 @@ services:
volumes:
- ./configs/:/code/configs
- ./common:/code/common
networks:
- copilot_local

chat-history:
image: tigergraphml/chat-history:latest
container_name: chat-history
Expand All @@ -48,6 +54,8 @@ services:
LOGLEVEL: "INFO"
volumes:
- ./chat-history/:/configs
networks:
- copilot_local

# report-service:
# image: tigergraphml/report-service:latest
Expand Down Expand Up @@ -76,3 +84,21 @@ services:
- 3000:3000
depends_on:
- copilot
networks:
- copilot_local

nginx:
container_name: nginx
image: nginx
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "80:80"
depends_on:
- ui
- copilot
networks:
- copilot_local

networks:
copilot_local:
19 changes: 19 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server {
listen 80;

location / {
proxy_pass http://ui:3000;
}

location ~^/ui/.*/chat$ {
proxy_pass http://copilot:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_read_timeout 86400;
}

location /ui/ {
proxy_pass http://copilot:8000;
}
}
Loading